Exports the workflow state to a JSON object.
Optional
options: ExportOptionsInterrupts a running workflow. Standard Job Completion tasks will run. Subscribers will be notified and the job hash will be expired.
Optional
options: JobInterruptOptionsReturns the current search state of the workflow. This is different than the job state or individual activity state. Search state represents name/value pairs that were added to the workflow. As the workflow is stored in a Redis hash, this is a way to store additional data that is indexed and searchable using the RediSearch module.
Waits for the workflow to complete and returns the result. If the workflow response includes an error, this method will rethrow the error, including the stack trace if available. Wrap calls in a try/catch as necessary to avoid unhandled exceptions.
Optional
config: { Optional
state?: booleanOptional
throwSends a signal to the workflow. This is a way to send
a message to a workflow that is paused due to having
executed MeshFlow.workflow.waitFor
. The workflow
will awaken if no other signals are pending.
Returns the job state of the workflow. If the workflow has completed this is also the job output. If the workflow is still running, this is the current state of the job, but it may change depending upon the activities that remain.
The WorkflowHandleService provides methods to interact with a running workflow. This includes exporting the workflow, sending signals, and querying the state of the workflow. It is instanced/accessed via the MeshFlow.Client class.
Example