To model the life cycle of an instance, use a state machine resource. Within a state machine resource you can configure the states and transitions. A state machine resource always exists within a concept.
To access a state machine resource, double-click on the relevant concept resource. The BusinessEvents State Modeler palette appears on the
Palettes tab and displays the state machine resource, shown here in the left margin.
At design time, one concept may have multiple state machine definitions. At runtime, BusinessEvents creates an instance of the concept’s main state machine. The main state machine usually makes calls to the other state machines associated with the concept. (See
CallStateMachine Resource Reference.)
Each concept is allowed at most one main state machine. A concept can inherit its main state machine. At runtime, BusinessEvents searches for a main state machine starting with the concept instance. If it does not find one, it moves up the inheritance chain until in finds a main state machine. It creates an instance of the first main state machine it locates.
If BusinessEvents cannot locate a main state machine in the concept instance or any concepts higher in the inheritance chain, it does not create an instance of any state machine for this concept.
Use the Main State Machine checkbox on the
Configuration tab to designate the main state machine.
Both state machines and states have timeouts. For the state machine, the timeout value specifies how long the state machine should wait before it completes. The Timeout Expression field allows you to define the length of the timeout as an expression. If the state machine’s timeout value is less than the sum of all of the states’ timeouts, the state machine’s timeout takes precedence.
The State Modeler includes its own set of functions, which are located in the Standard function registry of the Rule Editor under
Instance > StateMachine. For more information about the rule editor and general use of BusinessEvents functions, see
Chapter 9, Working With Rules and Functions. The rule editor itself provides tool tip documentation. You may also want to refer to
TIBCO BusinessEvents Language Reference.
A concept’s state machines can call any state machine that belongs to an ancestor of the concept. The state machine of a concept cannot call the state machine of a concept that is lower in the inheritance chain.