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 © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.