Repository navigation
v0.3.0: terminate and fault end a scope at once
A terminated or faulted scope now ends at once. Before this release, a terminate end event or a behavior fault reached in the same evaluation that had already started work could leave the process running forever.
Fixed
- #26: a terminate or a behavior fault in an evaluation that had already issued
StartWorkansweredDeferand parked the verdict on the state until the next work completion. If the work started in that evaluation waited on something that never came, such as a message, the process never ended. If it did complete, the parked path threwUnable to resolve the BPMN tokenfor hosts that don't hand correlation back.- The interpreter now withdraws that evaluation's
StartWorkcommands, along with their work records, and answersCompleteorFaultstraight away. Work activated and ended in the same instant is never started, and every other command keeps its order. - A terminate now also issues
CancelWorkSubtreefor every unit the host still reports live. Before, it stopped work only logically, and a host that doesn't cancel a completed scope's children itself left that work running. A unit already torn down in the same evaluation for a more specific reason keeps that reason; the rest get the newBpmnInterpreter.TerminateStopReason,bpmn.terminate.stopped-live-work. - A scope that has ended ignores later completions, faults and signals. It forwards no escalation to its parent and starts nothing.
- The interpreter now withdraws that evaluation's
Breaking changes
A terminate end event now requires the SubtreeCancellation host capability. A definition containing one is refused when the graph is built if the host doesn't declare it, the same rule 0.2.0 introduced for cancel end events.
Hosts should treat CancelWorkSubtree as idempotent. After a terminate, every later callback answers Complete again and repeats the teardowns still outstanding. A handle that is unknown or already torn down should be a no-op.
Behavior changes worth knowing
- A fault still carries no teardown, because a fault is a verdict, not a command (ADR 0003). A
Faultcontinuation may carry aSignalEnclosingScoperaised earlier in the same evaluation, and nothing else. - A caught error whose own path then faults now reports
Propagatedtogether with theFault. Before, it reportedCaughtwith aDefer. - States persisted by 0.2.0 with a parked terminate or fault still resolve on the next completion. The payload format is unchanged at 1.0.0.
Install
dotnet add package Bpmn.Semantics --version 0.3.0
dotnet add package Bpmn.Runtime.InMemory --version 0.3.0
Deterministic builds with SourceLink and .snupkg symbols. No dependencies beyond the base class library and each other.