Executing and Simulating CMMN Models

Estimated reading: 7 minutes 8 views

Most modelers assume a correct diagram means a functional case — but that’s the single biggest trap in adaptive case management. I’ve seen dozens of models fail in production not because of logic flaws, but because they were never tested under real-world variability. The truth is: CMMN simulation isn’t optional — it’s the only way to expose hidden gaps before deployment.

When I first began modeling complex insurance claims, I relied solely on peer review and static checks. Then a single misconfigured sentry triggered a cascading failure in live operations. That taught me: models must be run, not just drawn. This chapter is built on that hard-won insight — showing you how to simulate CMMN models, validate behavior across scenarios, and connect them to runtime platforms for real-world testing.

You’ll walk away with a repeatable process to test CMMN model behaviors under uncertainty, simulate dynamic triggers, and ensure your case logic holds up under pressure — all without touching a single line of code.

Why Simulation Beats Static Review

Visual inspection catches syntax errors. Simulation uncovers behavioral flaws.

Consider a healthcare intake case with multiple possible diagnosis paths. Static review might confirm all tasks exist and are connected. But simulation reveals whether the right task activates when a patient’s symptoms change — or if a milestone triggers prematurely due to a poorly defined sentry.

Here’s what simulation reveals that static review misses:

  • Task activation timing under event-driven conditions
  • Incorrect or missing transitions due to conflicting sentry logic
  • Deadlocks caused by unmet milestone criteria
  • Unreachable stages due to incorrect entry conditions
  • Case file data not updating as intended across tasks

These issues often go unnoticed until production, where they create delays, compliance risks, or frustrated users.

Simulate CMMN: The Modeler’s Diagnostic Tool

Think of CMMN simulation as a flight simulator for case logic. It allows you to run the model through real-world triggers — like a new document arriving, a deadline passing, or a key stakeholder becoming available — without any risk.

The best part? You don’t need a full runtime system to start. Modern modeling tools like Visual Paradigm allow full simulation directly in the editor using predefined test scenarios.

Start by setting up a basic scenario: a new case is created, a required document is uploaded, and a milestone is met. Run the simulation and observe:

  • Which tasks become available?
  • Are sentry conditions met?
  • Does the case progress to the next stage?
  • Is the case file updated correctly?

This is how you catch a hidden path dependency before it becomes a workflow crisis.

Step-by-Step: Testing CMMN Models in Practice

Testing a CMMN model isn’t about “passing” a test — it’s about stress-testing the logic under real-world variation. Follow this structured approach:

  1. Define test scenarios based on business events: e.g., “Document uploaded,” “Stakeholder declines,” “Deadline missed.”
  2. Set initial case state — populate case file items, mark tasks as incomplete, set stage status.
  3. Run simulation with one event at a time, observing transitions and task activation.
  4. Log outcomes — did the model behave as expected? If not, why?
  5. Adjust sentry conditions or task dependencies, then retest.

Example: In an insurance claim, simulate “Document received: medical report.” The model should activate the “Review by Underwriter” task and update the case file. If not — the sentry condition likely references the wrong data item.

Use Case: Simulating a Support Ticket Escalation

Let’s walk through a real example: a customer support case that escalates after 48 hours of inactivity.

Setup:

  • Stage: Initial Response
  • Task: Respond to Customer (Open)
  • Sentry: “Time elapsed > 48 hours and no response received”
  • Next Stage: Escalation

Run simulation:

  • Step 1: Create case — task is active.
  • Step 2: Advance time by 47 hours — no escalation.
  • Step 3: Advance time to 49 hours — sentry evaluates true → task activates, stage transitions.

If the model doesn’t escalate, the sentry likely uses timeElapsed instead of timeSinceLastActivity. Fix the condition. Retest.

Validating Complex Logic with Decision Tables

When logic becomes complex — such as multiple sentry conditions combining OR and AND rules — simulate CMMN models using decision tables for clarity.

Example: A claim is flagged for fraud review if:

  • Amount > $10,000 OR
  • Claimant has prior claims within 12 months AND
  • Service date is outside normal business hours

Build a decision table to map all combinations. Then simulate each scenario:

Condition 1 Condition 2 Condition 3 Action
Yes No No Flag for review
Yes Yes Yes Flag for review
No No Yes Do not flag

Run each row as a simulation scenario. This exposes ambiguous or missing logic — like when a claim is large but the other conditions aren’t met, yet the model flags it.

Use this method to prevent over-flagging or missed risks — a common pain point in compliance-heavy domains.

Connecting to Runtime Systems

Once your model passes simulation, the next step is integration. But don’t rush. Always validate the model in simulation first — it’s far easier to fix logic here than in a live system.

Integration typically involves:

  • Mapping case file items to application data fields
  • Configuring event listeners for triggers (e.g., “document uploaded”)
  • Defining external systems to activate tasks or update data

Always test the integration with simulation first. Use mock data to simulate external system responses. For example:

  • Simulate “External system returns OK” → verify task activates
  • Simulate “System timeout” → verify fallback logic or error handling

This approach prevents integration bugs from being discovered only after deployment.

Common Pitfalls and How to Avoid Them

Even experienced modelers make the same mistakes. Here are the top 4, and how to fix them:

  1. Overusing sentries with complex logic: Break down logic into simpler conditions. Test each part in isolation.
  2. Not accounting for parallel task execution: Simulate scenarios where multiple tasks can be active at once. Ensure data dependencies are resolved.
  3. Ignoring time-based triggers: Use simulated time progression to verify sentry conditions that depend on duration.
  4. Assuming all data is available at start: Simulate case creation with incomplete data. Verify that tasks don’t activate prematurely.

These aren’t edge cases — they’re the norm in real-world scenarios.

Frequently Asked Questions

How often should I simulate a CMMN model?

At minimum, simulate every time you modify a sentry, stage, or task dependency. For critical models (e.g., healthcare, insurance), simulate after every major change — even small ones.

Can I simulate CMMN without a runtime engine?

Yes — most modeling tools offer built-in simulation engines. They simulate behavior based on defined rules, event triggers, and data states. They won’t replicate exact runtime performance, but they’re sufficient for logic validation.

What’s the difference between testing and simulating a CMMN model?

Testing refers to validating a model under known conditions. Simulating involves running the model through dynamic, real-world events — like time passing or documents arriving — to observe behavior over time. Simulation is more comprehensive.

How do I handle multiple paths in simulation?

Use multiple test scenarios. For example: “Document uploaded,” “Stakeholder responds,” “Deadline missed.” Run each separately, then combine them to test complex flows.

Is it safe to simulate CMMN models in production environments?

No — always simulate in a sandbox or test environment. Never run simulations on live data unless explicitly designed for it. A simulation can trigger unintended task activations or data changes.

Can simulation detect data consistency issues?

Absolutely. Simulate case progression and check the case file at each step. If a data item is missing, incorrectly updated, or not propagated — the simulation will expose it. This is especially useful for complex cases with nested data structures.

CMMN simulation is not a one-off step. It’s a continuous practice — as essential as modeling itself. The models you build today will evolve. By simulating early, often, and with purpose, you ensure they evolve correctly.

Don’t just draw the case. Run it. That’s how you build trustworthy, adaptive systems.

Share this Doc

Executing and Simulating CMMN Models

Or copy link

CONTENTS
Scroll to Top