Apama Documentation : Developing Apama Applications : Developing Apama Applications in Event Modeler : Working with Blocks Created from Scenarios : Inheriting sub-scenarios : Notes for setting the inheritExternalInstances parameter
Notes for setting the inheritExternalInstances parameter
You can change the value of the inheritExternalInstances parameter during Scenario execution. When you do, the new value takes effect immediately. Likewise, as other main scenarios create sub-scenarios, a main scenario might inherit those sub-scenarios if it has a value of Owner or All for its inheritExternalInstances parameter.
When a main scenario changes the value of the inheritExternalInstances parameter, the scenario block searches within the correlator for sub-scenarios that the main scenario now inherits. For each sub-scenario that the scenario block finds, it sends data to its output feed. For example, if the scenario block finds five sub-scenarios that the main scenario now inherits, the scenario block sends five sets of data to its output feed. The scenario block also sends data to its group info feed that includes the inherited sub-scenarios in the counts. Subsequently, if any main scenarios create or terminate sub-scenarios that another main scenario inherits, or if any inherited sub-scenarios fail, the scenario block in the inheriting main scenario sends data to its output feed just as if the inheriting main scenario had created the sub-scenario.
A particular main scenario does not need to create any sub-scenarios before it can inherit sub-scenarios created by other main scenarios. For example, you might define a scenario block whose only purpose is to monitor inherited sub-scenarios and perform some sort of aggregation or analysis. Or, you can define a scenario block with true as the value of the deleteChildrenOnTerminate parameter. When you want to terminate all instances of that type of sub-scenario you need to only terminate one main scenario.
Keep in mind that inherited sub-scenarios are shared by more than one main scenario. That means that more than one main scenario can operate on the same sub-scenario. Be sure to consider this when you design your application.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback