Skip to main content

Domain model

This page explains the relationships behind the architecture. The diagram is conceptual; source classes and template documentation define the complete current API.

Process instance​

The origin process ID identifies an instance. It records the template name and hash, process state, completion conclusion, reason and time, and the latest snapshot version and snapshot names. Tasks have their own origin task IDs, task types, states and planning/completion information. Task states and process completion are defined in the template reference.

Process data consists of extracted keys, values and roles. Relations connect typed subject/object IDs using a predicate; process relations connect process instances with named roles and visibility. See Process data, Relation patterns and Process relations for their distinct purposes.

The persistence implementation is in ProcessInstance and its associated domain classes. Persistent identity and timestamps are separate from the business origin ID; use the API's documented identifiers when querying or scheduling maintenance.

ProcessRelation fields: names, roles, visibility and related process ID

Process-instance structure​

The diagram shows business attributes and relationships, not a complete persistence schema. Persistent entities additionally carry their database identity and timestamps; mutable entities carry a version for optimistic locking. Labels are resolved from template translations rather than persisted as task text.

The process state is STARTED or COMPLETED; completion conclusions are SUCCEEDED, CANCELLED or ABORTED. Task states and their lifecycle-dependent transitions are described in Process templates, including UNKNOWN and DELETED for template migration.

Message and pending message​

A Message records the incoming message identity, idempotence ID, name, timestamps and trace ID. Its extracted message data contains keys, values and roles scoped to templates. Related origin task IDs are also scoped to templates; user data provides additional information for the UI.

A PendingMessage associates a stored message ID with an origin process ID whose instance does not yet exist. This is distinct from late correlation through process data. Both allow messages to arrive before the information needed to attach them to a process is available.

PendingMessage connects an origin process ID to a stored message ID

Message structure​

Template scoping allows the same incoming message to serve several process templates without mixing their task IDs or extracted values. Pending messages retain the target origin process ID even before the process instance has been created.

Process template​

A ProcessTemplate combines task types, message references, process-data definitions, relation patterns, process relations, completion conditions and snapshot conditions. Message references select topics, correlation providers, extractors and correlation-by-data definitions. Task types define cardinality, instantiation/completion conditions and task-data extraction.

The template reference owns the JSON structure and plugin contracts. Template migration explains how changes affect existing instances.

Template composition​

DefinitionRelevant information
Task typeName, ordering, lifecycle, cardinality, planning/completion rules and displayed task data.
Message referenceMessage name, topic, optional cluster, correlation provider, message/payload/reference extractors and instantiation/correlation conditions.
Process dataDestination key and source message/data key.
Process relationName, role type, origin and target roles, visibility, and source message/data key identifying the related process.
Relation patternPredicate and subject/object selectors, including process-data keys and roles.
Task dataSource message and selected message-data keys.
Correlation by process dataMapping between an extracted message-data key and a process-data key.

Use the template JSON reference for exact field names and examples. The lifecycle and cardinality are separate concepts; the old single/dynamic cardinality vocabulary is supported only as a legacy mapping.

Process snapshot​

A snapshot is an Avro representation of the information needed for traceability at a given point in time, not a complete copy of the persistence model. See Process snapshots for creation, versioning and the archive REST interface.

Plugin context​

ProcessContext exposes the origin process ID, process name and message queries to conditions. Plugin messages expose their names, related origin task IDs and extracted message data. The plugin context is deliberately separate from the persistence model: exposing mutable state changed by conditions would make results depend on condition evaluation order. Its areAllTasksInFinalState() helper also requires at least one task. See Accessing messages in a condition.

The names in this diagram distinguish the plugin-facing message view from the persistent Message aggregate; the Java plugin interfaces are documented in the linked plugin context above.