The building blocks of the state machine editor

Compose your own business state machine using a combination of the following building blocks.

Interfaces

The interface The interface partner icon is a set of operations the state machine accepts and responds to.

References

The reference The reference partner icon is not an interface, but instead tells the state machine where to find operations that it can invoke. More to the point, it specifies the interface that is used in the invocation of another component.

Variables

Variables The variable icon store the data that are used by a state machine, and can be either a business object or a simple type.

Correlation sets

A correlation set defines properties that are used to distinguish one instance of a state machine from another within a runtime environment.

States

A state is one of several discrete individual stages that represent a business transaction. Typically, it has this kind of life cycle:
  1. The state begins with the execution of any existing entry actions.
  2. The state will then stop and listen for an event to occur.
  3. When an event occurs, a path is chosen that is appropriate to it.
  4. An exit action (if there is one) is executed before the state machine transitions to another state.

There are five different kinds of states:

Transitions

A transition A transition channels execution from one state to the next by recognizing the triggering event, evaluating the conditions necessary for execution to flow through it, and determining what actions can occur should execution be allowed. An event can trigger more than one transition at a time, but only one of those transitions will fire.

There are three kinds of triggering events:
  1. Call event - the transition is triggered when the correct operation is called
  2. Timer event - the transition is triggered when the timer expires
  3. Completion event - the transition is triggered when the source state is entered and its entry action, if any, is executed.

If an event triggers more than one outbound transition from a given state, the order that the transitions are checked is undefined. In the case of nested composite states, if an event triggers transitions in more than one composite state, the transitions are checked from the innermost composite state to the outermost composite state.

A transition has a life cycle that is characterized by the following stages:
  • A transition is disabled when the current state of the state machine is any other state than the source state of the transition. While disabled, a transition will ignore any instances of its trigger event.
  • A transition is enabled when the current state of the state machine is the source state of the transition.
  • A transition is triggered when it is enabled, and an instance of its triggering event occurs.
  • A transition is fired if it is triggered, and either has no guard condition or, the condition evaluates to true.

The following types of transitions can be used:
  • Default transitions

    A default transition is an unguarded, automatic transition whose source state is a composite state, and whose trigger is a completion event. A default transition fires whenever a final state within the composite state is entered. If a composite state defines a default transition, it must define a final state and vise versa.

  • Exception transitions

    Exception transitions are transitions whose triggering event is either a timer event or a call event, and whose source state is a composite state. Exception transitions are enabled when the composite state is entered and triggered when their triggering event occurs, regardless of which substate the composite state is in. If a substate defines a transition with the same triggering event, the guard, if any, of that transition will be checked before the exception transition. That is, transitions fire from the inside out.

  • Simple transition

    Simple transitions have source and target states that are different, and where exit and entry actions are executed.

  • Self transitions

    In a self-transition, the source state and the target state are the same.
    There are two kinds of self transitions. An external transition is one that executes both the exit and entry actions and registers a change of state. Conversely, an  internal transition is a self transition that does not allow the exit and entry actions to be executed. Internal transition cannot be defined on a composite state, an it's triggering event must be either a call event or a timer event.

Action bar objects

These objects appear within the action-bar, and are modifiers that are used on states and transitions.

There are six kinds of objects:

Feedback
(C) Copyright IBM Corporation 2005, 2007. All Rights Reserved.