Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Event Modeler | Working with Blocks Created from Scenarios | Linking sub-scenarios with other blocks
 
Linking sub-scenarios with other blocks
You can share sub-scenario instance IDs with other blocks. For example, the Wait block supports multiple concurrent timers. You could assign an ID to each timer and then use that same ID to create a sub-scenario. You could do this multiple times. When a timer fires, you can use the ID it reports to retrieve the associated sub-scenario and perform some operation on it, such as deleting it. For example:
When  time up from Wait (timer)
Then  instance id from MyScenarioBlock = timer id from Wait (timer)
Then  retrieve [MyScenarioBlock]
Then  continue

When  instance status from MyScenarioBlock (output) is equal to "RUNNING"
Then  move to state[next]

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.