Transition
A Transition is a type of node within a scenario.
Transitions are usually linked to :
- one or more upstream places.
- one (for state machines) or more downstream places.
Transitions can usually have :
- Zero or mutiple Sensor functions
- Zero or mutiple Effector functions
- A Token merge function
- A Token assign function
- A priority
Firing a transition

Transitions can fire if :
- All upstream places contain a token
- There is no Sensor function OR all the Sensor functions are valid. When checked, the sensors have access to the token data of all upstream places in the form of a merged token. This action does not consume the tokens from the upstream places yet.
When a transition fires (i.e. it meets the requirements above) it sequentially:
- Consumes all upstream places tokens
- Merges all sensors event contexts in an array of contexts. Each sensor context data path is prefixed with it's order number (i.e. the first sensors context data is in
EventContext.0.xxxxx
) - Sequencially runs all the Effector functions (see Effector)
- Assigns a token in every downstream place (see Token Assign) (note that if at least one of these downstream place contains a token, an error occurs)

Note
As we are working with 1-safe petri nets, the downstream places of a transition being fired must hold no token prior to the assignation. They can however hold a token anytime before that, including right before the merging of the tokens of upstream places if a place is both an upstream and a downstream place to a transition.
Transitions also contain a priority value, defaulted to zero. A higher priority transition gets to be checked before lower priority transitions. For more details on the order in which all functions of a transition are called, see Safe Petri Network.