Apama 10.7.2 | Developing Apama Applications | Developing EPL Plug-ins | Introduction to EPL Plug-ins
 
Introduction to EPL Plug-ins
Although the correlator's native programming language, the Apama Event Processing Language (EPL), has most of the functionality of modern programming languages, its primary purpose is enabling the detection of, correlation across, and triggering on complex event patterns.
In most cases, existing code could be ported and rewritten in EPL, but in practice this might not be feasible. For example, an application might need to carry out advanced arithmetic operations and a significant programming library of such functions might already be available. Porting such complex code to EPL would be a lengthy, expensive and error prone task, and is unnecessary.
The following topics describe Apama's EPL plug-in APIs and illustrate how to use them.
Note:
After upgrading to a new release of Apama, you always have to recompile your EPL plug-ins.
In order to incorporate existing specialized functionality, you can write EPL plug-ins in the following languages:
*C++: An EPL plug-in consists of an appropriately formatted library of C++ functions, which can be called from within EPL code.
*Java: The Java classes that are called from an application's EPL code are contained in a .jar file.
*Python: An EPL plug-in consists of a Python class with methods decorated to indicate they should be exported to EPL with the EPL action signature.
The correlator does not need to be modified to enable or to integrate with a plug-in, as the plug-in loading process is transparent and occurs dynamically when required.
Custom EPL plug-ins can be developed using Apama's EPL plug-in APIs for C++, Java, and Python. Once a plug-in is developed, you can call the functions it contains directly from the EPL code, passing EPL variables and literals as parameters, and getting return values that can be manipulated.
Note:
It is very important that strict plug-in development guidelines are followed when developing a plug-in. The functions provided must be adequately debugged prior to their integration within a plug-in. This is because when the correlator loads a plug-in, it is dynamically linked with the correlator's runtime process. If any code within the plug-in causes a runtime error, the correlator might fail and terminate.
For this reason, Apama customers who experience problems with correlator stability while using plug-ins will be asked by Apama Technical Support to remove the plug-in and reproduce the problem prior to being offered further technical help. Apama Technical Support will only lift this restriction if the plug-ins have had prior certification by Apama.