BPM Workflows

AuraBoot includes BPM workflow support for approval flows, task routing, SLA tracking, and state transition orchestration. BPM is useful when a record should not move directly from one state to another without human review or process logic.
Core concepts
| Concept | Description |
|---|---|
| Process definition | Workflow template, often BPMN-based |
| Process instance | A running workflow tied to a record |
| Task | Human or automated step in the process |
| Assignment rule | How a task owner is selected |
| Gateway | Conditional route in the workflow |
| SLA | Deadline and escalation behavior |
Workflow and command relationship
AuraBoot treats workflows and commands as complementary:
User clicks Submit
-> state transition command validates and changes record
-> workflow instance starts
-> approval task is assigned
-> approver completes task
-> next command changes record againThe command pipeline remains the source of truth for data changes. BPM coordinates who should act next and when.
Example: leave request approval
Draft request
-> Submit command
-> Manager approval task
-> Reject command -> status = rejected
-> Approve command
-> HR review task if days > 5
-> Final approved statusState transition command
{
"code": "submit_leave_request",
"type": "state_transition",
"modelCode": "leave_request",
"stateField": "status",
"fromStates": ["draft"],
"toState": "pending_approval",
"triggerProcess": "leave_request_approval"
}Assignment strategies
| Strategy | Use case |
|---|---|
| Fixed user | Always route to one known owner |
| Role-based | Any user with a role can claim |
| Field-based | Route to record owner, manager, assignee |
| Department head | Resolve from organization structure |
| Sequential | Route through multiple users in order |
SLA behavior
{
"taskCode": "manager_approval",
"sla": {
"dueIn": "24h",
"warningAt": "20h",
"escalateTo": "department_head"
}
}Use SLA rules for operational accountability: approvals, procurement, escalations, customer response, and exception handling.
What to model in BPM
Good BPM candidates:
- Approval flows
- Multi-party review
- Escalation-driven work
- Status lifecycles with human decisions
- Processes where audit history matters
Poor BPM candidates:
- Single-step CRUD updates
- Pure background automation
- UI-only wizard steps
- Logic that belongs in a command precondition
Verification checklist
When building a workflow:
- Define the record lifecycle first.
- Create state transition commands for each lifecycle step.
- Bind workflow tasks to those commands.
- Define assignment rules.
- Add permissions for submit, approve, reject, and administer.
- Test happy path, reject path, and unauthorized path.
- Check timeline and audit output.