Creating parallel-aware blocks
If you want a parallel scenario to use a block, you must mark that block as parallel-aware. You do this in the Builder tab of the block builder editor in Software AG Designer. Select the block name. Then select the Parallel-aware checkbox near the bottom of the Builder tab fields.
The correlator runs each instance of a parallel scenario in a separate context. For information about contexts, see
Implementing Parallel Processing.
When you mark a block you are creating as parallel-aware it means that you are taking responsibility for ensuring that the block functions correctly when run in multiple contexts. Blocks that do not listen for events are trivially parallel-aware since running in another context has no effect on that block. All of the block's interactions are mediated by the scenario.
Blocks that listen for events must ensure that the events they are listening for actually reach the context they are in. You can achieve this by storing a reference to the main context during the instancePreSpawnInit() action. Use this reference to inform services running in the main context where they should send events. Look at the Market Depth standard block for a good example of this.