Developing Apama Applications > Using Apama Studio > File Definition Formats > Function definition file format > Defining metadata in function definition files
Defining metadata in function definition files
The metadata in a function definition file has the following format:
<function name="string" display-string="string" return-type="string">
   <version>
      <id>version_number</id>
      <date>version_date</date>
      <author>version_author</author>
      <comments>internal_info_about_function</comments>
   </version>
   <description>
      description_of_what_function_does--appears_in_function_catalog   
</description>
   [<imports>
         <import library="string" alias="string"/>...
     </imports>]
   <parameters>
      [<fixed-parameter name="string" type="string"/>] ...
   </parameters>
   (EPL in a code element goes here)</function>
The top level function element must specify the following three attributes:
*name — Logical name of the function. To avoid function conflicts in Event Modeler, the value of this attribute must be unique across all .fdf files in each directory.
When you write the EPL code that implements the function, you specify #name# in place of the name of the function. When you use the function in a scenario, the Event Modeler replaces #name# with the value you specify for the function name attribute. When the Event Modeler does this, it adds an identifier to the name you specify to ensure that the function name is unique.
*display-string — Function name that the rules editor displays. When you want to use this function in a rule, this is the name that you select from the menu of functions. You might want to give your function a short name, but specify a more descriptive name for the value of the display-string attribute.
*return-type — Type of the value returned by the function. The table below shows the values you can specify for the return-type attribute, and the Event Modeler types these values map to:
Value of return-type Attribute
Maps to This Event Modeler Type
String
text
float
number
enumeration
choice
boolean
true/false
Copyright © 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.