How scenarios communicate with their blocks
Apama Studio implements a block as an event type. When you create a block, Apama Studio generates the event type definition for that block. The block’s event type definition includes a number of actions that Apama Studio defines for you and that you can edit.
Communication from a scenario to a block instance is accomplished through calls to these actions. That is, to initialize a block, change a parameter, call an operation, and so on, a scenario calls an action on the event that contains the block instance.
Communication from the block to its host scenario is also accomplished by calling actions. In this case, the actions have been passed into the block by the scenario. For example, when a scenario initiates an operation the scenario passes in an action that the block must call to indicate that the operation has been completed.