Escalate an order when its review deadline expires
Start two orders. Complete the first as the regular reviewer. Leave the second claimed across a server restart and finish it as the senior reviewer.
| BPMN example | Duration | Use |
|---|---|---|
| Order approval with deadline | PT48H |
The 48-hour process. Complete it without waiting for the deadline. |
| Order approval with deadline, one-minute demo | PT1M |
A separate process identity for trying timeout and recovery. |
Set up the server and reviewer
Section titled “Set up the server and reviewer”Build the TypeScript source distribution as in Getting started. Stop the in-memory Getting started server if it is still running. Start the local demo with a fresh SQLite file so the deadline survives shutdown. Keep this terminal in the source distribution.
GETRIEBE_SQLITE_PATH=./deadline-tutorial.sqlite pnpm startDownload run-workflow.ts. In a separate terminal,
run it with Node.js 26.13.1. The command provisions the local
senior-reviewer role and an account in that role. The account’s local demo
password is senior-reviewer.
node run-workflow.ts deadline prepareTo watch the task in the browser, start the Worklist lab
and sign in as reviewer with password reviewer before running the
one-minute process.
Add and deploy the deadline
Section titled “Add and deploy the deadline”Connect the Modeler to the
server. Open the 48-hour file, select Review order, and choose Edit
deadline. The Boundary Event sits on the task edge. Its Duration is
PT48H.
To practice attaching the timer, make a copy of the 48-hour file. In the
copy, remove the Boundary Event with its context-pad delete action.
Then select Review order, choose Add deadline, and use the new
timer’s Connect to other element action to connect it to Senior review.
The copy already declares the senior-reviewer BPMN Resource and uses
it as the senior task’s Potential owner role. Both review tasks map
the approval result and feed the XOR merge before the order decision.
Choose Validate to inspect element diagnostics and Validate and deploy to store the model. Open and deploy the one-minute file as a second process. Export either file and reopen it to check its duration and timeout connection.
Getriebe accepts a fixed positive duration at millisecond precision. For
example, use P1DT12H for 36 elapsed hours or PT0.5S for half a second.
The Modeler writes the duration as a string literal in the Getriebe
expression language. See the Boundary Timer profile.
Complete the regular review
Section titled “Complete the regular review”node run-workflow.ts deadline normalThis starts the 48-hour process, claims Review order and submits
approved: true. The process completes, and the senior reviewer receives
no task. Completion can also win after the due time if the server has yet
to process the timer.
Recover a waiting review after restart
Section titled “Recover a waiting review after restart”node run-workflow.ts deadline waitThis starts the one-minute process and claims Review order as
reviewer. Save the printed resume command and due time. Choose Refresh in the
Worklist to see the deadline in your local timezone.
Stop the server with Ctrl+C while the task is still waiting. Once the
printed deadline has passed, restart the server with the same SQLite path.
Reload the Worklist and sign in again to see that the regular task is gone.
To view Senior review, reload and sign in as senior-reviewer, or use a
separate browser session. Leave it unclaimed for the helper. An authorized
historical read still shows the previous task and its deadline.
node run-workflow.ts deadline resume INSTANCE_ID TASK_IDThe helper reads the regular task’s withdrawal event, prints its due and processing times, and completes the senior review through the HTTP API. The Worklist embedding lab shows and assigns work. The helper submits the approval result.
Try the two choices in the Cancel Activity diagram or inspect the runtime and recovery evidence.