The CallStateMachine resource allows you to call any state machine that is at the same level or higher in the inheritance chain. CallStateMachine resources exist only within state machines.
The state machine of a concept cannot call the state machine of a concept that is lower in the inheritance chain, and you cannot call a state machine recursively. That is, you cannot call a state machine from within itself either directly or indirectly.At design time, you may have concepts in the same inheritance chain that include same-named state machines. The Call Explicitly checkbox allows you to select the state machine you need.With the Call Explicitly checkbox deselected, BusinessEvents runs the state machine from the concept instance that contains the state machine which is making the call, if it exists. If the concept instance does not include a state machine with the specified name, it looks for the state machine in the concept that is directly above the concept instance in the inheritance chain. It continues its search up the inheritance chain, creating an instance of the first state machine it finds with the specified name. With the Call Explicitly checkbox deselected, the call is similar to a Java or C++ virtual function.Figure 11 Explicit CallsIn Figure 11, Concept AB represents the concept instance at runtime. Note that it has no main state machine. For each instance of AB, BusinessEvents creates an instance of Thelma, which is a main state machine. Because Thelma explicitly calls Louise from Concept A, BusinessEvents runs A.Louise. If the call to Louise had not been explicit, BusinessEvents would have created an instance of AB.Louise because AB is the concept instance. Under no circumstances would BusinessEvents create an instance of ABC.Louise because it is below the concept instance in the inheritance chain.To call a state machine, drag a CallStateMachine resource into an open state machine resource in the design panel. Then, in the State Machine field of the Configuration tab, browse for and select the desired state machine.
Copyright © TIBCO Software Inc. All Rights Reserved.