Transitions

The states in a state model are connected by transitions.

Transition Rules

A transition can optionally be triggered by a rule. If a transition has no rule (a lambda transition) then as soon as the prior state’s exit action (if any) has occurred, the state model moves to the next state (or to its entry action if it has one).

As with any rule, you can add advisory events, simple events, time events, concepts, and scorecards to the declaration section of a transition rule.

If you define a rule for the transition, the transition does not occur until the rule executes successfully.

Transition Rules Execute Once

In one respect, transition rules work like other TIBCO BusinessEvents rules: they participate in run-to-completion cycles. However, unlike regular rules, a transition rule executes at most only once.

For example, suppose a regular TIBCO BusinessEvents Studio rule has two entities in its scope (declaration) and has no condition. Such a rule might execute multiple times, for all matching tuples in the Rete network. However a transition rule executes only once, for the first matching tuple.

To understand more about rule behavior at runtime, such as the priority setting, the rule scope (declaration) and rule conditions, see TIBCO BusinessEvents Architect’s Guide. Rule configuration is documented in TIBCO BusinessEvents Developer’s Guide.

Self Transitions

Typically, transitions take an instance from one state to another state. Self transitions, however, connect a state to itself. Each time the instance loops back to the state, it triggers the entry action, and each time it leaves the state, it triggers the exit action.

Start and end states cannot have self transitions.

Loopbacks

Loopbacks are allowed between any types of states except between start and end states.

State Transitions

You can use state transitions (as opposed to Boundary transitions) for simple and for composite states. State transitions are not available for concurrent states.

For example:

Transitions that Cross Multiple Boundaries

When a transition crosses the boundary of one or more nested states, the entry or exit actions of those states are executed.

Boundary Transitions

Composite states can use boundary transitions and Concurrent states must use them. Boundary transitions trigger entry and exit actions of the state whose boundary they are attached to.

Below is an example of boundary transitions used for a concurrent state.