BPM Workflows

Task Center — pending approvals and tasks

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

ConceptDescription
Process definitionWorkflow template, often BPMN-based
Process instanceA running workflow tied to a record
TaskHuman or automated step in the process
Assignment ruleHow a task owner is selected
GatewayConditional route in the workflow
SLADeadline 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 again

The 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 status

State 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

StrategyUse case
Fixed userAlways route to one known owner
Role-basedAny user with a role can claim
Field-basedRoute to record owner, manager, assignee
Department headResolve from organization structure
SequentialRoute 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:

  1. Define the record lifecycle first.
  2. Create state transition commands for each lifecycle step.
  3. Bind workflow tasks to those commands.
  4. Define assignment rules.
  5. Add permissions for submit, approve, reject, and administer.
  6. Test happy path, reject path, and unauthorized path.
  7. Check timeline and audit output.

Next steps