Actions
Why
A person can open the first entity of a flow, replay a flow, replay from a step, resend a job, run a step without applying its result, cancel a run or an open step, and end a validity. The first opening is that request. request still waits when a run is already open, and still returns the recorded result inside the validity duration.
Who
You use these actions from the entity page. The buttons are on EntityView in apps/console/src/design/views.tsx. The page posts them through apps/console/src/app/entities/[...entityId]/actions.ts.
How
ReadController matches POST /entities/... in apps/orchestrator/src/nest/read.controller.ts and calls runEntityAction. A taken action responds 204. A run that is already open, or an action the state does not allow, responds 409. An unknown entity responds 404.
Replay
replay in packages/engine/src/engine.ts returns waiting and no job while the run is running. Otherwise it calls begin with the stored starting data, the flow rule, and the payload from the dialog when one was sent. Validity is ignored. The generation increases and the tree is replaced.
replayFrom keeps the operations before the chosen step and removes that step and everything after it, including inside a group or a taken arm. A cut group is not sealed. drive opens the step again. A result for a step that is no longer in the tree is ignored.
Resend and probe
resend is the same step as the silence duration, taken now. resendCount increases, a job is sent, and at the resend maximum the step result is not finished.
probe on the service assigns a dispatch slot entity/step/probe, so the live job's packet stays. That packet carries the generation and apply: false. The worker copies both onto the result. The job stays an organization, an entity, a step, and a token. applyResult stores that result with saveProbe and does not call acceptResult. The entity view exposes it as probes. A result whose generation is not the current generation is ignored.
Cancel and validity
cancelRun closes a running run as not finished without rereading the function. Each open step, including a detached step, receives { status: "not_finished", discriminant: "ended" }. Child entities keep running. Running parents that still link the entity are reread, so cancelling a child resumes the parent. A group that is already sealed does not change.
cancelMember writes that same result on an open step in a group that is not sealed, then rereads. The member has responded, so the rule can seal and the flow can continue.
cancelDetached writes that result on an open detached step and does not change the flow outcome. The step is not sent again.
endValidity clears validityEndsAt when the run is a success and that time is still ahead. The tree stays. The next request starts a run.