Apama Documentation : Developing Apama Applications : Developing Apama Applications in Event Modeler : Working with Blocks Created from Scenarios : Descriptions of scenario block feeds
Descriptions of scenario block feeds
Scenario blocks have no input feeds. Scenario blocks have three output feeds:
*output — Provides updated information about a sub-scenario. The scenario block sends output to this feed whenever the value of a sub-scenario variable changes. The main scenario that created the sub-scenario, and any other main scenarios that inherit the sub-scenario each get an output feed to indicate the changes.
*iteration ended— Indicates whether an iteration is complete.
*group info — Provides cumulative information about all sub-scenarios managed by this scenario block.
The following table describes the fields in each output feed.
Feed
Fields
Description
output
instance id
String that identifies the sub-scenario that changed.
instance owner
Identifies the user account under which the main scenario that is using this scenario block was created.
instance created
Boolean value that is true after the sub-scenario is created.
instance ended
Boolean value that is true after the sub-scenario stops processing. This can happen because it fails, is deleted, or ends its normal processing.
instance status
Enumerated string field that indicates the status of the sub-scenario. The value is one of the following:
*RUNNING — The sub-scenario has been created and has not ended, failed, or been deleted.
*ENDED — The sub-scenario has ended normally; it reached its end state.
*FAILED — The scenario block failed to create the sub-scenario, perhaps because of a duplicate instance ID. Or, the sub-scenario failed because something went wrong while it was running. For example, the sub-scenario tried to divide by zero.
*DELETED — The main scenario called the delete operation, which removes the sub-scenario from the correlator. Or, some other external entity deleted the sub-scenario from the correlator.
*UNKNOWN — The status of the sub-scenario is unknown. For example, the status is unknown after you invoke the create operation and before the scenario block actually creates the sub-scenario.
variables
In the output feed, there is a field for each source scenario variable. Each of these fields contains the current value of the variable for the identified sub-scenario.
iteration ended
complete
Boolean value that is true when iteration through the sub-scenarios that this scenario block manages is complete. When you call the next operation, and there is not another sub-scenario in the iteration, then the iteration ended feed outputs a value of true for the complete field.
group info
total created
Integer that indicates how many sub-scenarios this scenario block has created since it began processing.
total deleted
Integer that indicates how many sub-scenarios this scenario block has deleted since it began processing.
total loaded
Integer that indicates how many sub-scenarios created by this scenario block are loaded in the correlator. This includes sub-scenarios that are running, plus sub-scenarios that failed while they were running, plus sub-scenarios that have ended. This number does not include sub-scenarios that the scenario block tried to create and failed to create. In other words, the total loaded is equal to the total created minus the total deleted.
number running
Integer indicating how many sub-scenarios created by this scenario block are running.
number ended
Integer indicating how many sub-scenarios created by this scenario block are still loaded but have ended.
number failed
Integer that indicates how many sub-scenarios created by this scenario block are still loaded but have failed.
summary
Convenience string that summarizes the information provided by the other group info fields. For example: "Total Created: 100, Total Deleted: 40, Total Loaded: 60, Number Running: 10, Number Ended: 48, Number Failed: 2".
Inheritance affects the totals in the group info feed as follows:
*total created indicates the number of sub-scenarios that were created and that the main scenario could operate on. This number only goes up. This number includes sub-scenarios created by this main scenario as well as inherited sub-scenarios created by other main scenarios.
*total deleted indicates the number of sub-scenarios that were deleted while the main scenario could operate on them. This number only goes up. This number includes sub-scenarios created by this main scenario as well as inherited sub-scenarios.
*total loaded, total running, number ended, and number failed indicate the number of sub-scenarios that are currently loaded in the correlator and that the main scenario can operate on. This number goes up and down.
For example, suppose inheritExternalInstances is set to Owner for MainScenarioA. Now suppose MainScenarioB, which has the same owner as MainScenarioA, creates a new sub-scenario. The total created field for MainScenarioA gets incremented by 1. Now suppose that MainScenarioC, which has a different owner, creates the same type of sub-scenario. The total created field for MainScenarioA would not get incremented.
Following is an example of an output feed. Suppose the source scenario defines the following variables:
*SYMBOL (Input)
*SIDE (Input)
*PRICE (Output)
*QUANTITY SOLD (Output)
The output feed would have the following fields:
instance id
instance owner
instance created
instance ended
instance status
SYMBOL
SIDE
PRICE
QUANTITY SOLD
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback