About event flow states
At any moment in a scenario instance’s execution, it is said to be in a particular state in the event flow. The activities and actions that a scenario instance will be doing at any moment depend on its state, and are defined by that state’s rules.
The execution of a scenario instance consists of progressing through a sequence of states, starting from the start state, and ending at the end state. For this reason, all scenarios must have a start and an end state.
A scenario instance can only ever be in one state, but there might be a choice of states it can advance to from that state. It is also possible for a scenario instance to move from a state back to the same state again. A scenario instance will continue executing until it reaches the end state, then it will terminate.
The Event Flow tab illustrates all the possible states that the scenario instance can be in while it is running inside the correlator. Note how when the Statistical Arbitrage sample is loaded the Event Flow tab is showing the following states (the arrows indicate possible transitions between states):
Event Flow tab
Using this scenario as an example, when the Statistical Arbitrage scenario is deployed to the correlator, it will start execution from the start state. From this state it can only transit to the Wait for Spread state. In Wait for Spread, however, it can go directly to the end state and terminate its execution (by means of a global rule - shown as an orange line; more on this later), or else transit to the Monitor Opportunities state by means of a local rule.
From the Monitor Opportunities state, the scenario can advance to the Wait for Orders state, or it can terminate execution and go to the end state. If execution does reach the Wait for Orders state, it can only transit back to the Wait for Spread state. What causes a scenario instance to change from one state to another state, and what it does while it is in a state, depends on its rules.
Copyright © 2013
Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.