Using Apama with Software AG Designer > Working with Projects > Editing Apama files > Defining shorthand (templates) for frequently used EPL code
Defining shorthand (templates) for frequently used EPL code
EPL templates provide a way for you to define a short name for a longer pattern that you often specify in an EPL file. For example, Apama provides the dict template. When you enter dict followed by a space, dictionary<> is automatically inserted.
Apama provides some templates in Software AG Designer and you can define additional templates. Each Apama project can use all EPL templates.
Apama provides the following EPL templates. To use one, type its name followed by a space.
Name
Description
Pattern
dict
dictionary<>
dictionary<%\c>
ona
on all
on all %\c
onall
on all
on al %\c
seq
sequence<>
sequence<%\c>
In the pattern, %\c indicates the location of the cursor after you type the template name.
To define an EPL template:
1. In the Software AG Designer menu bar, choose Window > Preferences.
2. Expand Software AG > Apama.
3. Expand MonitorScript.
4. Click Editor Templates.
5. Click New.
6. In the Name field, specify what you want to enter to insert an instance of the template.
7. In the Description field, specify what Apama should display in the EPL file.
8. In the Pattern field, duplicate what you specified in the Description field and insert %\c to indicate the location of the cursor after Apama inserts the value.
9. Click OK twice. All Apama projects can now use this template.
Copyright © 2013-2015 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.