Currently supported elements:
A workflow must have exactly one none start event. The event is triggered when the workflow is started via API and in consequence a token spawns at the event.
<bpmn:startEvent id="order-placed" name="Order Placed" />
A workflow can have one or more none end events. When a token arrives at an end event, then the it is consumed. If it is the last token, then the entire workflow instance ends.
<bpmn:endEvent id="order-delivered" name="Order Delivered" />
Note that an activity without outgoing sequence flow has the same semantics as a none end event. After the task is completed, the token is consumed and the workflow instance may end.