Developing Apama Applications > Developing Apama Applications in Event Modeler > File Definition Formats > Defining EPL code in function definition files
Defining EPL code in function definition files
In a function definition file, the last element in the function element is the code element. The code element contains one CDATA section that contains EPL code that defines one action. The requirements for the EPL code are as follows:
*The parameters and types that the EPL defines must match the parameters and types specified in the parameters element.
*The return type specified in the EPL code must match the type specified for the functionreturn-type attribute.
*Specify the name of the action as #name#.
*Specify the name of a plug-in as #alias_value#.
*The function must be valid EPL code.
For example:
<code><![CDATA[
  action #name#(float f) returns float {
    return f.abs();
  } ] ] > 
</code>
*The function can use local variables. To use a scenario variable, assign its value to a function parameter.
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.