We broke the demo workflow on purpose, one fault at a time, ran real applications, captured what the applicant, the officer and Kibana showed, and restored the good workflow. Try to diagnose each drill before reading the answer.

Create application does nothing; DevTools shows 403

Kibana: UNAUTHORIZED_ROLE_ON_TRANSITION on event APPLY
The fault: only agents may APPLY
{
"startState": "NEW",
"event": "APPLY",
"authorisedRoles": ["ROLE_AGENT"],
"endStateOne": { "stateCode": "PAYMENT_PENDING", ... }
}

The applicant sees a normal "Submitted for Processing"

Kibana: ASSIGN_OFFICE → WORKFLOW_ENGINE_ERROR, OFFICE_NOT_FOUND, four attempts
![]()
The tracker line: event, start state, source INTERNAL
The OFFICE_ASSIGNMENT action pointed to an office id that does not exist. The engine tried four times (the first attempt and 3 retries, 60 seconds apart), then gave up. The application C260930160938VLLWAM is still in PENDING_ASSIGN_OFFICE. Fix the office in the workflow (a Service Improvement on a live service), then ask support to re-trigger the event.

Only Request for Action and Reject: Approve is hidden
No error anywhere: the portal simply hides transitions the signed-in officer may not fire. The APPROVE transition had authorisedUsers set to another user. Kibana has nothing to show, so read the workflow JSON.

The officer rejects with a reason

An empty error toast; the dialog stays open

Kibana with the traceId from DevTools: 42 lines

The cause: getApplicationState → NotFoundException
The REJECT transition's end state was COURSE_DEMO_REJECTED_TYPO, a state that does not exist. The portal saved it without complaint. After fixing the code, the officer's next click works (user actions are synchronous; nothing to re-trigger).
The four drills
| Drill | User sees | Kibana | Fix |
|---|---|---|---|
| A | 403 on submit-application | UNAUTHORIZED_ROLE_ON_TRANSITION, event=APPLY | Authorise applicant roles on APPLY |
| B | Normal status, empty inbox | WORKFLOW_ENGINE_ERROR OFFICE_NOT_FOUND; tracker source=INTERNAL | Fix office; re-trigger ASSIGN_OFFICE |
| C1 | Approve button missing | Nothing | Fix authorisedRoles / authorisedUsers |
| C2 | Empty red toast, 500 | CACHE_VALUE_NOT_FOUND → NotFoundException in getApplicationState | Fix the state code; retry |
| Item | Matches |
|---|---|
| 403 when the citizen clicks Create application | UNAUTHORIZED_ROLE_ON_TRANSITION |
| Paid, stuck in PENDING_ASSIGN_OFFICE | OFFICE_NOT_FOUND |
| Empty toast on Reject, 500 | NotFoundException in getApplicationState |
| Approve button hidden | No log: authorisedUsers |
← D5 · Kibana: find an application's story · D7 · Cheat sheet: states, events, actions, go-live →