Skip to content

Subprocesses ​

A subprocess node stands for another process embedded in this one. It takes part in the sequence flow exactly as an activity does, and it carries the identifier of the process it references.

In BPMN a subprocess is a collapsed activity: a rounded rectangle with a small bordered + centred on its bottom edge. Instant Process draws it the same way. The + marks the node as standing for a whole process rather than a single step.

Subprocess ​

Input

pml
SUBPROCESS 'text input' PROCESS 'process id'

The PROCESS clause is required, and its value is the target process's id, written between single quotes.

Input suggestion

Implicit identifier:

pml
SUBPROCESS 'Handle claim' PROCESS '3f2504e0-4f89-11d3-9a0c-0305e82c3301' NEXT

Explicit identifier:

pml
SUBPROCESS Claim 'Handle claim' PROCESS '3f2504e0-4f89-11d3-9a0c-0305e82c3301' NEXT OtherNode

Picking the process ​

The editor toolbar carries an Insert subprocess action, and typing subprocess in the code editor offers the same action as a completion. Both open a picker that searches the processes you can read by name and content, shows each result's name and drive location, and writes the complete SUBPROCESS line at the cursor. The process you are editing is never listed.

Asking the assistant ​

The AI assistant finds the process for you. Name the process in your request, for example "add a subprocess for the claim handling process", and it searches the processes you can read and writes the SUBPROCESS line with that process's id. When several processes match, it asks which one you mean; when none match, it says so. Ask what a SUBPROCESS line points at and it answers with the referenced process's current name, or tells you the reference does not resolve.

Changing the process a node references ​

The code editor draws a Change reference action above every line holding a subprocess reference. It opens the same picker and swaps in the chosen process's id, keeping your own label and the rest of the line. The action needs the write lock.

What the node shows ​

The label on the canvas is the description you wrote, not the referenced process's name. Rename the referenced process and this node keeps the label you gave it.

Hovering the node shows the referenced process's current name. In the code editor, hovering the quoted process id shows the same name, and ctrl-clicking (cmd-clicking) it opens that process.

Following the reference ​

A subprocess node whose reference resolves carries an arrow next to the + on its bottom edge. Clicking that arrow opens the referenced process in the editor. The toolbar then shows the trail of processes you came through: select an entry to go back to it, which drops every process below it. The trail lives for the browser session and survives a reload.

Clicking the node itself selects it, the same as any other node. A discussion anchors to the selected node.

Expanding a subprocess ​

Clicking the + on a subprocess node draws the referenced process inside a labelled bordered container where the node was. The container's label is the referenced process's name, edges into and out of the node attach to the child's start and end nodes, and the rest of the diagram moves aside to make room.

The - in the container's top-right corner collapses it again. A subprocess node inside a container can itself be expanded, so containers nest.

Expansion is yours alone. It is not saved in the process, it does not need the write lock, other people looking at the same process see it collapsed, and it resets when you reopen the editor. While something is expanded, edits by anyone else redraw the diagram with your expansions intact.

A node does not expand when you cannot read the target, when the target is gone, when the reference leads back to a process already expanded above it, or when it sits deeper than the configured limit. Those nodes draw their + without a control.

Expanding a process that declares lanes places all of its nodes in the lane the subprocess node occupied, and the compile output says so on that line.

A flow that reaches an expanded subprocess ends on its boundary. A flow that continues afterwards leaves from that boundary.

When the reference does not resolve ​

  • You cannot read the target. The node draws your own label and nothing else. It shows no name and carries no arrow.
  • The target is gone, in the trash, or belongs to another tenant. The node draws with an error outline, the compile output carries a warning on that line, and the node carries no arrow. All three cases look the same.
  • The reference leads back to a process already expanded above it. The node draws with an error outline and the compile output carries a warning on that line.
  • The node sits deeper than the expansion limit. The node stays collapsed and says so on hover.

Exports and public preview links never resolve a reference: they draw the collapsed node with your label, no name, and no link.

Dutch ​

The Dutch keywords are SUBPROCES and PROCES.

pml
SUBPROCES 'Claim behandelen' PROCES '3f2504e0-4f89-11d3-9a0c-0305e82c3301' VOLG

Styling ​

The subprocess stylesheet selector styles these nodes, and it supports the same properties as activity.

text
subprocess {
    fill: '#ffffff';
    stroke: '#000000';
    text-color: '#000000';
    strokewidth: '4';
}

A subprocess node is drawn with the thick border BPMN gives a call activity. That border appears in every export.

The + control on the node's bottom edge belongs to the editor. It is drawn in the interface's own colours and never appears in an export.

The subprocess-group selector styles the container an expanded subprocess draws.

text
subprocess-group {
    fill: 'transparent';
    stroke: '#000000';
    text-color: '#000000';
}

Deleting a referenced process ​

Saving a process records which processes it references. Moving a process to the trash names, in the confirmation, how many processes you can read that reference it, and the delete goes ahead. While the process sits in the trash those references draw as not found. Deleting it permanently drops the recorded references in both directions.

Errors ​

  • A SUBPROCESS node without a PROCESS clause is a compile error on that line.
  • A PROCESS value that is not a well-formed process id is a compile error on that line.
  • A subprocess node that references the process being edited is reported as a quality finding.
  • A subprocess node whose target leads back to the process being edited is reported as a quality finding.
  • A process that declares more subprocess nodes than the reference limit carries a warning on the first node past the limit. The process still saves and still renders. References past the limit are not recorded, so they do not appear when you ask what references a process, and deleting a target does not name this process.
  • A subprocess node whose identifier is longer than 256 characters carries a warning on that line. Its reference is not recorded, with the same consequences. An implicit identifier is the quoted description, so a very long description is the usual cause.

Exporting ​

The export dialog carries a Draw expanded subprocesses switch and a depth in levels next to it. With the switch off, every subprocess node is drawn collapsed. With it on, every reference you can read is drawn expanded down to the depth you set, and a reference deeper than that is drawn collapsed. One level expands the subprocesses of the process being exported and nothing below them. A reference you cannot read stays collapsed at any depth.

Availability ​

Subprocesses are available on every plan. The trial editor is the exception: it refuses the node type with a compile error, because a trial process has no drive to reference.