Repository navigation
5.5.2.1.5. Final Node
A Final Node marks completion of the current Activity execution. In UML Activity notation it is the activity-final symbol: a filled circle inside an outer circle. When execution reaches it, the Activity execution is terminated; it has no outgoing flow.
Declare one with AddFinal() and route a control or object flow to it:
.AddInitial(node => node.AddControlFlow("CapturePayment"))
.AddAction(
"CapturePayment",
async c => await payments.CaptureAsync(paymentId, c.CancellationToken),
node => node.AddControlFlow<FinalNode>())
.AddFinal()The default registered name is FinalNode.Name. Activity node names are globally unique, so provide distinct names when an Activity has multiple final nodes: AddFinal("completed"). A supplied final-node name is registered as given, without a containing-scope prefix.
Final Nodes are useful for ending a normal path or stopping an iterative structured Activity early. A Final Node is not interchangeable with an output pin: the pin exports data from a nested Activity and does not itself signify completion. See Structured Activity Node, Iterative Activity Node, and Output Pin.
Home page Support Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0. © by Mikołaj Milewski, 2026