Process lifecycles
In Zeebe, the process execution is represented internally by events of type ProcessInstance. The events are written to the log stream and can be observed by an exporter.
Each event is one step in a process instance lifecycle. All events of one process instance have the same processInstanceKey.
Events which belong 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
Event lifecycle

Sequence flow lifecycle
Example
Given the above process, a successful execution yields the following records in the commit log:
| 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 |
| ELEMENT_ACTIVATING | order-delivered | end event |
| ELEMENT_ACTIVATED | order-delivered | end event |
| ELEMENT_COMPLETING | order-delivered | end event |
| ELEMENT_COMPLETED | order-delivered | end event |
| ELEMENT_COMPLETING | order-process | process |
| ELEMENT_COMPLETED | order-process | process |