Developing Apama Applications > Developing Apama Applications in Event Modeler > Working with Blocks Created from Scenarios > Deleting sub-scenarios
Deleting sub-scenarios
To delete a sub-scenario when it reaches its end state:
1. Check the output feed for a true value for the instance ended field.
2. Call the delete operation.
The output event that the scenario block sends to its output feed to indicate that the instance has finished processing also makes the completed instance the context instance. Consequently, you do not need to set the instance id parameter before you call the delete operation.
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.