Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Event Modeler | Creating Blocks | Defining new blocks in Software AG Designer | Considerations for adding EPL code to the block definition
Considerations for adding EPL code to the block definition
As you add custom code to your block, keep the following in mind:
*The # character denotes special names that will subsequently be assigned automatically by the code generator. Therefore, do not use the # character anywhere else in your EPL files, including within comments.
*You must not specify a die statement anywhere in the block event type definition. Consequently you should not call spawn() in the block event type definition as you would have no way of terminating the new monitor instance.
In situations where you might want to spawn from within a block, use a utility monitor that is part of the block's definition instead. Insert the EPL code for a utility monitor in the USER DEFINED MONITORS section of your block definition file. For example, suppose your block subscribes to one or more market data feeds and you want to track data and status messages that result from each subscription. Write a utility monitor that listens for events related to the subscriptions and caches values that result from subscription operations. You can specify a die statement in this monitor without affecting the block or the scenario.
*If the EPL code in your block causes a runtime error, for example, you attempt a division by zero or you attempt to access an out of bounds index in a sequence or dictionary, the scenario monitor will be terminated by the correlator.
See also Timeliness of acknowledgements.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.