Skip to content

Capability to Select a 'Starting Step' for a Workflow #1211

Answered by jamshally
jamshally asked this question in Q&A
Discussion options

You must be logged in to vote

For the benefit of others, we finally achieved this via WorkflowStepMiddleware. The following code snippet demonstrates the fundamental part of this approach:

// ----------------------------------------------------
// Inside IWorkflowStepMiddleware.HandleAsync
// ----------------------------------------------------

// Retrieve the workflow definition using the current workflow's definition ID and version.
var definition = _workflowRegistry.GetDefinition(context.Workflow.WorkflowDefinitionId, context.Workflow.Version);

// Find the designated start step within the workflow definition based on an external identifier.
var startStep = definition.Steps.Find(x => x.ExternalId == workflowTarget…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jamshally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant