Replies: 1 comment 2 replies
-
|
Thanks! To start a workflow, you have two options:
APITo use the REST API, you need to have a workflow definition ID. When you have it (e.g. That will execute the workflow synchronously. If you want to execute the workflow from a background job instead (so that the HTTP call returns even before the workflow starts, you can dispatch the workflow instead, like this: For either call, you can provide input to the workflow by including a JSON payload with the C#If you want to execute a workflow programmatically from within the workflow server, then you use the For example, to execute a workflow synchronously: var workflowDefinitionId = "7b626d125eae49ce99e30b4f223322aa";
await _workflowLaunchpad.FindAndExecuteStartableWorkflowAsync(workflowDefinitionId);To dispatch the workflow, you need to perform two steps: find the workflow to dispatch, then dispatch: var startableWorkflow = await _workflowLaunchpad.FindStartableWorkflowAsync(workflowDefinitionId);
var result = await _workflowLaunchpad.DispatchStartableWorkflowAsync(startableWorkflow); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @sfmskywalker
First of all i would like to thank you about the great job.
Afterr publishing the workflow using workflow designer, how can I start a new workflow instance based on WorkflowDefinitionId or Workflow Name.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions