About half of real services need more than one approval: an officer checks the file, a head of unit recommends it, a director signs. Each desk is an office level (LEVEL_1, LEVEL_2, LEVEL_3), and the application has one processing state per level. Assignment 2 (the KIPA SRD) has three.
↻ At every level the officer can also REJECT (to REJECTED) or REQUEST_FOR_ACTION (to PENDING_RESUBMISSION_LEVEL_n). SUBMIT_RFA brings it back to the same level.
The skeleton of a three-level workflow (KIPA SRD, T5 to T17)
| Start state | Event | End state | Breaking action |
|---|---|---|---|
| PENDING_ASSIGN_OFFICE | ASSIGN_OFFICE (system) | PENDING_OFFICER_PROCESSING_LEVEL_1 | OFFICE_ASSIGNMENT, officeLevel LEVEL_1 |
| PENDING_OFFICER_PROCESSING_LEVEL_1 | ESCALATE (officer) | PENDING_OFFICER_PROCESSING_LEVEL_2 | OFFICE_ASSIGNMENT, officeLevel LEVEL_2 |
| PENDING_OFFICER_PROCESSING_LEVEL_2 | ESCALATE (officer) | PENDING_OFFICER_PROCESSING_LEVEL_3 | OFFICE_ASSIGNMENT, officeLevel LEVEL_3 |
| PENDING_OFFICER_PROCESSING_LEVEL_3 | APPROVE_WITH_FORM (officer) | APPROVED | GENERATE_CERTIFICATE |
| PENDING_OFFICER_PROCESSING_LEVEL_n | REQUEST_FOR_ACTION (officer) | PENDING_RESUBMISSION_LEVEL_n | (notification only) |
| PENDING_RESUBMISSION_LEVEL_n | SUBMIT_RFA (citizen, agent) | PENDING_OFFICER_PROCESSING_LEVEL_n | (notification only) |
Moving up a level: ESCALATE carries the next office
{
"startState": "PENDING_OFFICER_PROCESSING_LEVEL_1",
"event": "ESCALATE",
"authorisation": { "authorisedRoles": ["ROLE_OFFICER"], "systemAuthorised": false },
"endStateOne": {
"stateCode": "PENDING_OFFICER_PROCESSING_LEVEL_2",
"breakingAction": {
"actionType": "OFFICE_ASSIGNMENT",
"args": {
"officeAssignmentType": "CODE_FIXED_OFFICE",
"officeLevel": "LEVEL_2",
"officeId": "[the LEVEL_2 office id from your trainer]"
}
}
}
}
Rules for multi-level workflows
| Rule | Why |
|---|---|
| One PENDING_RESUBMISSION state per level | SUBMIT_RFA must know where to go back. With one shared state, a correction asked at level 3 would return to level 1 |
| SUBMIT_RFA returns to the same level, no new OFFICE_ASSIGNMENT | The application keeps its office; the officer who asked for the correction gets it back |
| REJECT on every level | Any desk can refuse; each REJECT needs the notification with the comment |
| An officer profile in every office | An office with no active officer swallows the application (lesson A13) |
| The last level often approves with a form | The director adds the data the certificate needs (lesson A10). Some services also escalate with APPROVE_WITH_FORM when a lower level must record something |
Gotcha · testing three levels alone
Each level is assigned to a different office, and an officer only sees the applications of their offices. To test the whole chain with one account, ask your trainer to give your officer account access to the three offices, then switch office in the officer portal after each escalation. Otherwise you need three officer accounts.
Tip · reference
Events · OFFICE_ASSIGNMENT · Office assignment configuration.
A level 2 officer requests a correction. The applicant edits and resubmits. Which state and office does the application return to?
C. SUBMIT_RFA goes from PENDING_RESUBMISSION_LEVEL_2 back to PENDING_OFFICER_PROCESSING_LEVEL_2 with no new assignment, so the same office gets it.
← B8 · Office assignment and routing · B8c · Branching, custom states and chained events →