Diagram - BPMN Activities

Edit tasks, nested subprocesses, same-model calls and descriptive loop profiles.

#Usage

Use a selected Task record; changing its type follows semantic validation.

Use a Task for one activity, a Subprocess for owned internal records, and a Call Activity for a reference to another process page. They share selection and history but have different ownership rules.

Use the BPMN setup with the module installed in the store. Keep the matching semantic root and copied inspector under Diagram.Root. The examples below include their complete model and controls.

#Choose a task type

Use the focused task editor to compare none, user, service, send, receive, manual, script and businessRule. The copied inspector supplies one Task type interaction for these values.

TypeExtra modeling fieldsMeaning when omitted
none, user, service, send, receive, manualNo subtype-specific script/rule fieldsThe chosen descriptive task marker
scriptscript ≤8192 characters; scriptFormat ≤128No script/format specified; neither executes
businessRuleimplementation ≤256, ##unspecified, ##WebService or absolute URI-shaped identifier##unspecified; no resolver

Optional text is nonblank when present. Switching subtype clears properties that belong to the old type. Activity IO has separate data rules.

#Own a nested process

This focused example intentionally leaves the outer subprocess and Outside scope task unconnected. Their missing incoming and outgoing sequence flows produce completeness warnings; the inner Start → Check stock → Done process is connected. These warnings allow unfinished authoring and do not mean the demo failed.

Loading Demo...

Select Check order to collapse or expand it. The inner Start, Check stock and End stay saved as its children. Their positions are local and scopeId is sub. Outside scope belongs to the process page. Try moving child out rejects because its connected inner flow would cross scope; revision and history stay unchanged.

diagramBpmnDestination(model, pageId, parentId?) resolves the semantic process/scope through actual lanes and subprocesses. Use editor.reparent(ids, parentId) for semantic transfers. It composes ordinary lane/container transfer with updated process/scope metadata and internal flow ownership. Moving both endpoints may work when all remaining relationships permit it. Changing only generic parentId is insufficient for a semantic scope transfer.

Ordinary and transaction subprocesses contain None Starts. Transaction scopes also permit Cancel End and attached interrupting Cancel boundaries. Event subprocesses have their own Start rules. A fixed subprocess container cannot clip its content; collapsed agrees in semantic and container state. Converting an empty subprocess to task/call removes its container in one transaction. Internal children must be moved/removed before conversion. Compatible boundary attachments may stay; incompatible host/flow changes reject.

#Reference a reusable process page

Loading Demo...

The Call references Checks on another process page in the same model. Select it and use the inspector to choose or clear its target. Clear target leaves valid incomplete work with a warning. Try foreign target rejects without changing it.

calledElement: { documentId, processId } names the actual model and process page. It cannot target an embedded subprocess, participant pool, global task or external model. A provided dangling/incompatible reference rejects. Renaming the page preserves its ID. Removing/reclassifying it requires clearing or repairing callers. Calls do not clone target geometry. Cyclic/self references are inert links. Cross-model reuse requires clearing a resolved call before copying, then choosing the destination target.

#Describe ad-hoc work and loops

Loading Demo...

Select Independent reviews and use the inspector. Its disconnected child activities are valid ad-hoc work. Toggle collapse to compare the same saved scope. Loop and ad-hoc fields describe work without scheduling or running it.

#Activity reference

SurfaceValues, defaults and limits
task, call, subprocessThe type union above; subprocess: 'ordinary' | 'event' | 'transaction' | 'adHoc', required Boolean collapsed.
loopOmitted means no loop. One standard or multiInstance object on tasks, calls and ordinary/transaction/ad-hoc subprocesses; excluded on event subprocesses.
Standard looptestBefore defaults false; optional condition nonblank ≤2048; maximum integer 1–1,000,000.
Multi-instancesequential defaults false (parallel); optional cardinality/completionCondition nonblank ≤2048 each. Missing cardinality warns. No collection/data-item reference profile.
adHocOnly on ad-hoc subprocesses. ordering defaults parallel; completionCondition optional ≤2048, missing warns; cancelRemainingInstances defaults true for parallel and is excluded for sequential ordering. Start/End children reject; no activity warns.
isForCompensationOptional Boolean on task/call/ordinary/transaction/ad-hoc subprocess. See handlers. Compensation activities have no ordinary sequence/default flow.
defaultFlowIdOptional actual outgoing sequence ID on compatible activity/gateway; that flow has no condition.

Copied inspector actions map to these same saved fields: taskChange, subprocessChange, collapse, loopMode, standardLoop, multiLoop, setLoop, callTarget, scriptProperties, ruleImplementation, adHocOrdering, adHocCompletion, adHocCancel and compensationActivity. loopMode chooses none, standard, sequential or parallel and initializes mode-specific fields. Empty optional text clears it. updateNode submits the complete union value through the editor. Current content permission covers same-size edits; required shape resizing still needs resize permission. Undo/Redo recheck current policy.