Controling the Start of a State Machine

By default, main state machines start when their associated concept instance is asserted. You can also configure TIBCO BusinessEvents not to start a concept's main state machine immediately after the concept is asserted.

Choose this mode by unchecking the concept’s Auto Start State Model checkbox. Note that this setting applies to concepts, not state machines, even ones that are inherited.

See TIBCO BusinessEvents Developer’s Guide for more information on concept and rule configuration settings.

Procedure

  1. Open the editor for the state model’s owner concept.
  2. In the Configuration section, clear the Auto Start State Model check box.
  3. Open the rule editor for all appropriate rules and rule functions, depending on your project design, and add the following standard function:
       Instance.startStateMachine()

    This function takes two parameters: the concept name (specified using its project folder path), and a Boolean. The effect of the Boolean is as follows:

    • If set to true, then contained concepts’ main state machines are also started, if not already started (or if the contained concepts’ main state machines also have the Auto Start State Machine checkbox checked).
    • If set to false, then only the main state machine of the concept passed to the function is started.