Terminology for using scenario blocks
To use blocks created from scenarios, you must understand the following terms:
Source scenario — A scenario block that you export to create a block.
Scenario block— A block that you create from a scenario by selecting
Scenario >
Generate Block in the Apama Studio menu and then saving and building the project. Alternatively, you can select
Export as Block from
File >
Export dialog.
Main scenario — A scenario that uses a scenario block.
Sub-scenario — A source scenario instance that a scenario block dynamically creates. When you use a scenario block in a main scenario, the scenario block manages sub-scenarios according to the rules you define in the main scenario. The operations a scenario block can perform on a sub-scenario include
create,
retrieve,
commit,
delete,
delete all,
iterate, and
next.
Context instance — Also referred to as the context sub-scenario. This is the current sub-scenario. A scenario block can create any number of sub-scenarios. However, at any point in time, a main scenario can modify only the context instance. Certain operations make a particular sub-scenario the context instance. You can also set the value of the scenario block
instance id parameter to the instance ID for a particular sub-scenario and then call the scenario block
retrieve operation to make that sub-scenario the context instance.
The following figure shows the relationships among these items.
Relationship between source scenario and scenario block