CMMN (Case Management Model and Notation)
CaseMgr implements CMMN concepts for flexible, knowledge-work case management. Unlike rigid workflows, CMMN allows dynamic, event-driven execution.
Tasks
Tasks represent work items with full lifecycle state management:
available → enabled → active → completed
↓ ↓
disabled suspended → active
↓
terminated
| State | Description |
|---|---|
| available | Task exists but conditions not yet met |
| enabled | Entry criteria satisfied, can be started |
| active | Work in progress |
| suspended | Paused, preserves context for resumption |
| completed | Successfully finished |
| terminated | Stopped without completion |
| failed | Error or inability to complete |
Stages
Stages are containers for grouping related plan items (tasks, milestones, other stages). They follow the same lifecycle as tasks.
{
"name": "create_stage",
"arguments": {
"case_id": "#1:0",
"name": "Authentication Phase",
"status": "available",
"auto_complete": true
}
}
Milestones
Milestones represent achievements – no work, just marks completion. Simpler lifecycle:
available → completed
↓
terminated
Sentries
Sentries define entry/exit criteria that guard transitions. They are linked TO the items they guard.
| Property | Description |
|---|---|
| sentry_type | “entry” or “exit” |
| source_ref | Item ID to watch for events |
| standard_event | complete, terminate, create, update, delete |
| condition | Expression or description for AI to evaluate |
| satisfied | Whether criterion has been met |
AI Usage Pattern
1. Create Stage: "Authentication Phase"
2. Create Tasks: "Design OAuth", "Implement OAuth", "Test OAuth"
3. Link tasks to stage via link_items
4. Create entry Sentry: "Design must be completed"
5. Create exit Sentry: "All tests must pass"
6. AI reads sentries, evaluates conditions, triggers transitions