Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: Microsoft.Azure.Workflows.Sdk
OperationChain represents a directed chain of workflow operations, tracking a start node and one or more end nodes. It is the result of every Then() call and supports combining parallel branches that share the same root.
Usage
var trigger = WorkflowTriggers.BuiltIn.CreateHttpTrigger();
var left = trigger.Then(WorkflowActions.BuiltIn.Compose(inputs: () => "Left").WithName("Left"));
var right = trigger.Then(WorkflowActions.BuiltIn.Compose(inputs: () => "Right").WithName("Right"));
// Join two chains that share the same trigger root
var joined = left.Join(right);
// Fan-in: add an action after both branches
joined.Then(WorkflowActions.BuiltIn.Compose(inputs: () => "Merged").WithName("Merged"));
WorkflowFactory.CreateStatefulWorkflow("fanInWorkflow", trigger);
Methods
Join
Combines this chain with another OperationChain that shares the same root operation, producing a single chain with unified end nodes. Use this method to merge independently built branches before continuing with additional actions.
public OperationChain Join(OperationChain other)
| Name | Description | Type | Required |
|---|---|---|---|
| other | The chain to join with. Must share the same start node. | OperationChain | Yes |
var trigger = WorkflowTriggers.BuiltIn.CreateHttpTrigger();
var branch1 = trigger.Then(WorkflowActions.BuiltIn.Compose(inputs: () => "A").WithName("BranchA"));
var branch2 = trigger.Then(WorkflowActions.BuiltIn.Compose(inputs: () => "B").WithName("BranchB"));
// Merge both branches
OperationChain merged = branch1.Join(branch2);
// Continue after both branches complete
merged.Then(WorkflowActions.BuiltIn.Response(
responseBody: () => "Both branches done").WithName("FinalResponse"));
Then
This type implements Then() methods from IChainableNode. See that page for full documentation of all overloads.
Related Content
- AgentToolContext Class Definition
- IChainableNode Interface Definition
- IVariableWorkflowAction Interface Definition
- IWorkflowAction Interface Definition
- IWorkflowOperation Interface Definition
- IWorkflowProvider Interface Definition
- IWorkflowTrigger Interface Definition
- Typed Workflow Action Interfaces Definition
- Typed Workflow Trigger Interfaces Definition
- WorkflowActionBase Class Definition
- WorkflowActions Class Definition
- WorkflowBuiltInActions Class Definition
- WorkflowBuiltInTriggers Class Definition
- WorkflowContext Class Definition
- WorkflowControlActions Class Definition
- WorkflowFactory Class Definition
- WorkflowManagedActions Class Definition
- WorkflowManagedTriggers Class Definition
- WorkflowProviderExtensions Class Definition
- WorkflowTriggerBase Class Definition
- WorkflowTriggers Class Definition
- WorkflowVariableActions Class Definition