Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Standard Blocks > The Utility blocks > Scenario Terminator v2.0
Scenario Terminator v2.0
The Scenario Terminator block is unusual in that it does not directly interact with the scenario through any feeds, parameters or operations. The Scenario Terminator block simply listens for special events that can be sent to the correlator, and terminates the scenario if requested to.
Description
The Scenario Terminator block depends on the ScenarioDeleterSupport.mon file, which is supplied in the monitors folder. This EPL file must be injected before a scenario containing the Scenario Terminator block can be injected.
Unlike other blocks, there is no value in including the block more than once, though doing so is not an error.
This block has no parameters, no operations, no input feeds, and no output feeds.
The Scenario Terminator block listens for the following events:
com.apama.scenarios.DeleteAllScenarios()
com.apama.scenarios.DeleteScenariosByUser(string owner)
The first deletes all scenarios with a Scenario Terminator block. The second deletes all scenarios for the given dashboard username that have a Scenario Terminator block. For example, to delete all scenarios for the user roguetrader, do the following:
com.apama.scenarios.DeleteScenariosByUser("roguetrader")
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.