# BPMN Ad Hoc Sub-Process

**In short:** An ad hoc sub-process groups activities that have no fixed order. Each activity can run several times, in any order, or be skipped. The choice happens at runtime, not at design time.

## Explanation

Most process models fix the order of steps in advance. Some work does not fit that mold. A BPMN ad hoc sub-process (see BPMN Activity) is a container for such work. It holds a set of activities, and the order is left open.

**What "open" means**

- Each inner element can run several times, in any order, or not at all.
- By default, no sequence flows connect the inner activities.
- Which activities run, in what order, and how often is decided at runtime, not at design time.
- The inner elements are not connected to a start or end event. An ad hoc sub-process must not contain them.

**Who decides**

Open sequencing does not mean no control. In Camunda's BPMN, the engine can decide, based on an expression in the model. A job worker, which is code that handles work on behalf of the engine, can also decide. Camunda can run an ad hoc sub-process internally in its engine Zeebe, or through a job worker.

**When it ends**

If the model defines no completion condition, the sub-process finishes after all activated elements are done.

**Alternative for free-form work**

CMMN is an OMG standard for cases whose activities may happen in an unpredictable order. OMG states that combining BPMN and CMMN covers a much broader range of work methods. That supports using CMMN next to BPMN for free-form work.

**Typical use**

Camunda proposes ad hoc sub-processes for agent-driven or flexible work. In that work, people add or remove tasks as circumstances change.

## Example

A support team handles a complaint. The ad hoc sub-process holds "call the customer", "check the order history", "request a refund" and "escalate to a manager". The case worker picks what the situation needs. They may call the customer twice and skip the refund. When all activated tasks are done, the sub-process ends.

## Trade-offs

**Benefits:** the model fits work where the steps cannot be known in advance. People or software can add or remove tasks as circumstances change.

**Costs:** the model no longer shows the order of work, because that is decided at runtime. Readers learn less about the process from the diagram alone. Control moves to an engine expression or a job worker. For work that is mostly free-form, a CMMN case model may fit better, according to OMG's view that BPMN and CMMN complement each other.

BPMN diagram: [An ad hoc sub-process with three activities and no sequence flows between them.](https://arc.fuet.ch/diagrams/concepts/modeling-bpmn/bpmn-ad-hoc-sub-process/diagram-1.bpmn)

## Checks

- Ad hoc sub-processes in the model contain no start or end events.
- The model states who chooses the inner activities at runtime: the engine via an expression, or a job worker.
- Where no completion condition is defined, the team knows the sub-process ends once all activated elements are done.
- Free-form work is modeled with an ad hoc sub-process only where order is truly decided at runtime, not at design time.

## Related

- [BPMN Activity](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-activity.md)
- [BPMN 2.0 Notation](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-2-0-notation-overview.md)
- [BPMN Core Elements](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-core-elements.md)
- [BPMN Event](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-event.md)
- [Process Model versus Process Instance](https://arc.fuet.ch/concepts/modeling-bpmn/process-model-versus-process-instance.md)
- [BPMN Gateway](https://arc.fuet.ch/concepts/modeling-bpmn/bpmn-gateway-semantics.md)
- [Adaptability](https://arc.fuet.ch/concepts/quality-attributes/adaptability.md)

## Sources

- [Ad-hoc sub-processes | Camunda 8 Docs](https://docs.camunda.io/docs/components/modeler/bpmn/ad-hoc-subprocesses/) — docs.camunda.io, accessed 2026-11-09
- [Building flexibility into BPMN models | Camunda 8 Docs](https://docs.camunda.io/docs/components/best-practices/modeling/building-flexibility-into-bpmn-models/) — docs.camunda.io, accessed 2026-11-09
- [Case Management Model and Notation™ (CMMN™) | Object Management Group](https://www.omg.org/cmmn/) — omg.org, accessed 2026-11-09
- [Orchestrating the Messy Middle of Case Work: Highlights From Our New Whitepaper | Camunda](https://camunda.com/blog/2025/12/orchestrating-messy-middle-case-work/) — camunda.com, accessed 2026-11-09
