Workflow Lifecycles

In Zeebe, the workflow execution is represented internally by events of type WorkflowInstance. The events are written to the log stream and can be observed by an exporter.

Each event is one step in a workflow instance. All events of one workflow instance have the same workflowInstanceKey.

Events which belongs to the same element instance (e.g. a task) have the same key. The element instances have different lifecycles depending on the type of element.

(Sub-)Process/Activity Lifecycle

activity lifecycle

Event Lifecycles

Start/Boundary Event

catch event lifecycle

Intermediate Catch Event

event lifecycle

End/Throw Event

throw event lifecycle

Pass-Through Lifecycles

sequence flow lifecycle

gateway lifecycle

Example

order process

Intent Element Id Element Type
ELEMENT_READY order-process process
ELEMENT_ACTIVATED order-process process
EVENT_TRIGGERING order-placed start event
EVENT_TRIGGERED order-placed start event
SEQUENCE_FLOW_TAKEN to-collect-money sequence flow
ELEMENT_READY collect-money task
ELEMENT_ACTIVATED collect-money task
ELEMENT_COMPLETING collect-money task
ELEMENT_COMPLETED collect-money task
SEQUENCE_FLOW_TAKEN to-fetch-items sequence flow
... ... ...
SEQUENCE_FLOW_TAKEN to-order-delivered sequence flow
EVENT_ACTIVATING order-delivered end event
EVENT_ACTIVATED order-delivered end event
ELEMENT_COMPLETING order-placed process
ELEMENT_COMPLETED order-placed process