Developing Apama Applications > Using Apama Studio > File Definition Formats > Function definition file format > Defining metadata in function definition files > Defining the imports element
Defining the imports element
The optional imports element provides a place to specify any plug-ins required by your function. Any plug-ins you specify must be written in the correlator plug-in API. The imports element can contain any number of import elements. Each import element must contain the following attributes:
*library — Name of the file that contains the plug-in required by your function.
*alias — Name of the plug-in in the code element of the function definition file. When you write the EPL code that implements the function, you specify #alias_value# as the name of the plug-in. When you use the function in a scenario, the Event Modeler replaces #alias_value# with the name of the function in the specified library.
For example:
<imports>
   <import library="TimeFormatPlugin" alias="timePlugin"</import>
</imports>
In the code element, you would specify something like the following:
return #timePlugin#.formatTime
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.