Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Event Modeler | Overview of Using Event Modeler | About event flow states
 
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 demo is loaded the Event Flow tab is showing the following states (the arrows indicate possible transitions between states):
Note: The Event Modeler is deprecated, and therefore the Statistical Arbitrage demo that is available from the Welcome page has been changed to use EPL streams and data views (instead of scenarios). This description, which is based on the Statistical Arbitrage demo of a previous version, has been kept for your convenience.
Using this scenario as an example, when the Statistical Arbitrage demo 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-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.