Package com.axelor.workflow.exec
Class RunCancellation
java.lang.Object
com.axelor.workflow.exec.RunCancellation
Takes back what a run, a region or a set of branches still has in flight: approvals, parks, the
runs it called, and the run itself when it is over. Nothing answerable is left behind.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabandonRun(Long runId, String reason) Give up a run for good, finishing it as cancelled;terminateRun(java.lang.Long, java.lang.String)is the same teardown ending as a completion cut short.voidcancelBranches(List<MetaWorkflowBranch> branches, String reason) Take down a set of live branches and what they hold: a nested split, a call they wait on, and their open approvals.intcancelCalledRuns(Long runId, String callNodeId, String reason) End the child run of one call whose cancelling boundary fired, and everything it called, leaving the host's other children, such as escape branches, alone.intcancelChildOf(String parkKey, String reason) The child a branch was parked on at a call, taken down with the branch; its approvals belong to the child.intcancelDescendants(Long runId, String reason) Everything below a run, for the endings that finish the root themselves.voidcancelLiveBranches(List<MetaWorkflowBranch> branches) Take back the approvals of branches still waiting, so a failed run leaves nothing clickable.voidcancelRegion(MetaWorkflowSplit split, String reason, String viaBoundary) A boundary interrupted a whole<subflow>: every thread in the region stops, its park closes, and the activation is cancelled.voidGive up whatever this run still has in flight: every live split, its owed branches and their approvals.intcancelRunTree(Long runId, String reason) Give up a run and everything it called, however deep.voiddiscardParks(List<String> parkKeys) Take back the parks a split's branches opened during a walk that then did not need them: a sealed quorum, a sibling's terminate, a failure.booleanterminateRun(Long runId, String atNode) A terminate end was reached: everything else in flight stops, and the run finishes as terminated.voidwithdraw(MetaWorkflowTask task) Take back one approval nobody can act on any more, and tell its inbox to refresh.
-
Constructor Details
-
RunCancellation
public RunCancellation()
-
-
Method Details
-
abandonRun
Give up a run for good, finishing it as cancelled;terminateRun(java.lang.Long, java.lang.String)is the same teardown ending as a completion cut short. -
cancelRunTree
Give up a run and everything it called, however deep. The root goes first, so a child cancelled afterwards cannot resume a caller that is being torn down. -
cancelChildOf
The child a branch was parked on at a call, taken down with the branch; its approvals belong to the child. -
cancelCalledRuns
End the child run of one call whose cancelling boundary fired, and everything it called, leaving the host's other children, such as escape branches, alone. -
cancelDescendants
Everything below a run, for the endings that finish the root themselves. -
cancelRun
Give up whatever this run still has in flight: every live split, its owed branches and their approvals. How the run itself ends is the caller's to decide. Idempotent. -
terminateRun
A terminate end was reached: everything else in flight stops, and the run finishes as terminated. -
cancelBranches
Take down a set of live branches and what they hold: a nested split, a call they wait on, and their open approvals. Shared by a sealed quorum and an interrupted region. -
cancelRegion
A boundary interrupted a whole<subflow>: every thread in the region stops, its park closes, and the activation is cancelled. The run itself carries on from the boundary, which the subflow's visit records as its way out. -
cancelLiveBranches
Take back the approvals of branches still waiting, so a failed run leaves nothing clickable. -
withdraw
Take back one approval nobody can act on any more, and tell its inbox to refresh. -
discardParks
Take back the parks a split's branches opened during a walk that then did not need them: a sealed quorum, a sibling's terminate, a failure. Called in the transaction that opened them, so withdrawing the approvals leaves the inbox as it was. A branch parked at a call started a child run that commits regardless, so that child is cancelled.
-