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/Gateway Lifecycle

activity lifecycle

Event Lifecycle

event lifecycle

Sequence Flow Lifecycle

sequence flow lifecycle

Example

order process

Intent Element Id Element Type
ELEMENT_ACTIVATING order-process process
ELEMENT_ACTIVATED order-process process
ELEMENT_ACTIVATING order-placed start event
ELEMENT_ACTIVATED order-placed start event
ELEMENT_COMPLETING order-placed start event
ELEMENT_COMPLETED order-placed start event
SEQUENCE_FLOW_TAKEN to-collect-money sequence flow
ELEMENT_ACTIVATING 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-delivered end event
ELEMENT_COMPLETED order-delivered end event
ELEMENT_COMPLETING order-placed process
ELEMENT_COMPLETED order-placed process