- Introduction
- Getting started
- Process modeling with BPMN
- Process modeling with Case Management
- Designing a persistent case entity schema
- Defining case keys (system vs. external)
- Establishing task I/O and write-back contracts
- Exit rules and early stage termination
- Modeling primary and secondary stages
- Triggering a case from Data Fabric
- Implementing stage-level personas and permissions
- Setting SLAs and automated escalation rules
- Configuring a rework loop (re-entry)
- Managing live case instances: pause, migrate, and retry
- Maestro case management component dictionary
- Process implementation
- Debugging
- Simulating
- Publishing and upgrading agentic processes
- Common implementation scenarios
- Extracting and validating documents
- Process operations
- Process monitoring
- Process optimization
- Reference information
Maestro user guide
Overview
Primary stages represent the sequential happy-path phases of a case (for example, Intake → Review → Settlement → Closure), while secondary stages handle exception paths such as requesting additional information, denying a case, or processing a withdrawal. Use this guide to build both stage kinds in the Case Plan Designer in Studio Web, configure their rules, and connect them to create a complete case lifecycle.
Audience: Intermediate — Automation Developers, Business Architects
Prerequisites
- Access to Studio Web.
- A case project already created in Studio Web with a case name, case key, and trigger configured. See Create a case and set up the trigger for details.
- A case entity [Coming Soon] available via Data Fabric, VDO, or case trigger, with fields that stage rules can evaluate (for example,
decision,action). - Familiarity with case entity fields and how tasks write back to them.
Step 1: adding primary stages to the canvas
Primary stages define the happy path — the sequential phases every case follows under normal conditions.
Opening the case plan designer
- In Studio Web, open your case project.
- Navigate to the case plan canvas.
Adding stages
-
Select the + icon beside an existing stage, or select the + icon directly on the canvas, to add a new stage.
-
Repeat to create all the primary stages for your process. For example, a property insurance claims case uses four primary stages:
- Intake
- Review
- Settlement
- Closure
-
Arrange the stages in the expected order of progression from left to right.
Step 2: configuring primary stage rules
Each primary stage carries rules — entry, complete, exit, and optional re-entry — that control its lifecycle. Configure these rules using case entity fields populated by tasks.
Setting Entry rules
Define when each stage activates. The first primary stage typically activates on case creation; subsequent stages activate when the preceding stage completes.
- Select a stage on the canvas to open its configuration panel.
- Configure the Entry rule for the stage. Examples:
- Intake: Activates on case creation (default for the first stage).
- Review: Activates when Intake tasks complete.
- Settlement: Activates when the Review decision is a qualifying outcome (for example,
vars.adjusterDecision == "approve").
Setting Complete and Exit rules
Define when the stage finishes normally (Complete rule) and when it should bail out early (Exit rule).
- In the stage configuration panel, set the Complete rule and, if needed, the Exit rule.
- Use case entity fields and/or task completion status. Examples:
- Intake → Review: Complete rule fires when required Intake tasks complete and
vars.validationPassed == true. - Review → Settlement: Complete rule fires based on the decision or action from Review tasks; Exit rule fires early if a denial decision is detected.
- Intake → Review: Complete rule fires when required Intake tasks complete and
Configuring re-entry rules (optional)
Re-entry rules allow a case to return to a previously completed stage for rework. This is what makes case management non-linear.
- Open the Re-entry rule panel on the originating stage (the stage that decides rework is needed).
- Define the rule. For example:
- Review → Intake (rework): WHEN the claim officer review task completes IF
vars.decision == "Claim is missing key incident reports".
- Review → Intake (rework): WHEN the claim officer review task completes IF
- On the target stage (Intake), confirm the per-task
runOnlyOnceflags reflect the rework intent. Tasks re-run by default; setrunOnlyOnce: trueon tasks whose previous output is still valid (for example, Extract claim details). Tasks like Incident reports Robot and Anomaly agent (Snowflake) stay at the defaultfalseso they re-execute. See Configuring a rework loop for the full pattern.
When a stage is re-entered, tasks with runOnlyOnce: false (the default) re-execute and produce fresh output. Tasks with runOnlyOnce: true are skipped and retain their previous results.
Step 3: adding secondary stages
Secondary stages handle exception paths — situations where the case deviates from the happy path. Toggling a stage as secondary removes its incoming edges and lets it activate from anywhere when its entry rule evaluates true. The stage's Complete rule (or Exit rule) action then decides what happens next: typically Return-to-origin, Exit the case, or Wait for manual selection.
Three common patterns:
- Return-to-origin — the case routes back to the stage that activated this one after the secondary stage completes.
- Case-ending — the case ends when the secondary stage completes (action = Exit the case or Complete the case).
- Connector-driven entry with case-ending exit — an external event triggers entry into the secondary stage, and the case ends on completion.
By default, a secondary stage's Entry rule has interrupting = true, so activating it exits any other active stages and forces the case into the secondary stage. Override per stage if you want parallel activation.
Adding a return-to-origin secondary stage
Use this pattern when the case must collect additional information and then resume processing from the stage that initiated the detour.
Example: Pending with Customer
- Add a new stage to the canvas, name it (for example, Pending with Customer), and mark it secondary.
- Configure two Entry rule branches so different outcomes from the originating stage can route the case here:
vars.decision == "Request documents"vars.decision == "Missing reports"
- Set the Complete rule action to Return-to-origin so the case routes back to the stage that activated this one (for example, Review) when all tasks complete.
- Add tasks to this stage (for example, Request documents, Document agent).
Adding a case-ending secondary stage
Use this pattern for final outcomes that end the case without returning to the happy path.
Example: Denied
- Add a new stage to the canvas, name it (for example, Denied), and mark it secondary.
- Configure the Entry rule based on a decision from an upstream stage:
vars.action == "Reject"(triggered from Review).
- Set the Complete rule action to Exit the case. When all tasks complete, the case ends.
- Add tasks to this stage (for example, Send denial packet, Generate audit report).
Adding a connector-driven case-ending secondary stage
Use this pattern when an external event — not an internal rule — triggers the case to enter a case-ending state.
Example: Withdrawn
- Add a new stage to the canvas, name it (for example, Withdrawn), and mark it secondary.
- Set the Entry rule to listen for a connector event:
- Select the Connector (for example, Microsoft Teams).
- Select the Trigger (for example, Channel Message Posted).
- Add filters or parameters as needed.
- When this external event arrives, the case enters the Withdrawn stage automatically. Because the entry rule defaults to
interrupting = true, any active stages are exited.
- Set the Complete rule action to Exit the case. When all tasks complete, the case ends.
- Add tasks to this stage (for example, Send withdrawal packet, Generate audit report).
Step 4: adding tasks to each stage
- Inside each primary or secondary stage, select + Add Task.
- Select the task type (Human action, RPA, API workflow, Execute Connector, AI Agent, Maestro Agentic Process, or Child Case).
- Configure inputs and outputs for each task by mapping case entity fields.
- Set an Entry rule on tasks where conditional execution is needed (for example, run a task only when
Amount >= 1000).
Step 5: validating, publishing, and deploying
- Validate the case plan to confirm that all stages, tasks, and rules are correctly configured.
- Publish the case plan from Studio Web.
- Deploy and activate the published plan in a target folder.
- Monitor live case instances in Case Instance Management and verify that cases move through primary and secondary stages as expected.
Expected outcome
After completing these steps, your case plan includes:
- Primary stages arranged in a sequential happy path, each with entry, complete, exit, and optional re-entry rules.
- Secondary stages that handle exception paths — returning to origin for additional information, ending the case on denial, or responding to external connector events.
- Tasks within each stage that read from and write back to the case entity [Coming Soon], driving stage rule evaluation.
Cases created from this plan follow the happy path under normal conditions and route to secondary stages when exceptions occur. Terminal secondary stages close the case, and return-to-origin secondary stages resume processing from the point of departure.
Use case example
Scenario: Property Insurance Claims
| Stage | Type | Behavior |
|---|---|---|
| Intake | Primary | First stage. Extracts claim details, looks up policy, runs anomaly detection. |
| Review | Primary | Coverage check, appraisal, auditor agent, claim officer verification. |
| Settlement | Primary | Fulfilment, settlement processing, communications agent. |
| Closure | Primary | Claim packet creation, audit report generation. |
| Pending with Customer | Secondary (Complete action: Return-to-origin) | Requests missing documents. Returns to Review on completion. |
| Denied | Secondary (Complete action: Exit the case) | Sends denial packet and generates audit report. Case ends. |
| Withdrawn | Secondary (connector-driven entry; Complete action: Exit the case) | Activated by a Microsoft Teams message. Sends withdrawal packet. Case ends. |
Troubleshooting
| Symptom | Cause | Resolution |
|---|---|---|
| A secondary stage never activates | Entry rule does not match any case entity value at runtime | Verify that upstream tasks write the expected values to the case entity fields referenced in the entry rule's IF clause. |
| Re-entry triggers an infinite loop | No mechanism prevents repeated re-entry | Add a re-entry counter field to the case entity [Coming Soon] and include a threshold in the re-entry rule (for example, vars.reentryCount < 3). Escalate to a human when the threshold is exceeded. |
| Return-to-origin stage does not route back | Complete rule action is not set to Return-to-origin | Open the secondary stage configuration and confirm the Complete rule action is Return-to-origin, not Exit the case. |
| Connector-driven stage does not activate on external event | Connector trigger is misconfigured or filters are too restrictive | Verify the connector and trigger event in the stage entry rule configuration. Check filter parameters against the actual event payload. |
Limitations
- Case user roles and access scoped to individual stages is not yet available.
- Native case-entity support in Data Fabric is not yet available.
- Variable references in stage rules must use fields defined in the deployed case plan version. If a field does not appear, verify that the correct version is selected.
Next steps
- How to add tasks to stages — Configure Human, RPA, AI Agent, and other task types within your stages.
- How to configure SLAs and escalations — Set case-level and stage-level SLAs with at-risk and breach escalation rules.
- How to configure the Case App — Set up the case title, case details, and business user workspace.
- Maestro Case core concepts — Reference documentation for stages, tasks, rules, and case entities.
- Overview
- Prerequisites
- Step 1: adding primary stages to the canvas
- Opening the case plan designer
- Adding stages
- Step 2: configuring primary stage rules
- Setting Entry rules
- Setting Complete and Exit rules
- Configuring re-entry rules (optional)
- Step 3: adding secondary stages
- Adding a return-to-origin secondary stage
- Adding a case-ending secondary stage
- Adding a connector-driven case-ending secondary stage
- Step 4: adding tasks to each stage
- Step 5: validating, publishing, and deploying
- Expected outcome
- Use case example
- Troubleshooting
- Limitations
- Next steps