Since BPEL 2.0 it is possible to extend the language by user-defined activities and custom variable assignment mechanisms.
Apache ODE (>= 2.0) supports these extensibility mechanisms and provides a plug-in architecture that allows for registering third-party extensions.
BPEL extensions must be declared for use in the process preamble to tell the engine which extensions must be available and which are optional. This can be done by adding an <extension>
element to your BPEL process model:
<bpel:process...> <bpel:extensions> <bpel:extension namespace="#extension-namespace#" mustUnderstand="#yes|no#"/> </bpel:extensions> ... </bpel:process>
This snippet declares the given extension namespace and tells the engine what to do if no extension bundle is registered for this namespace. If mustUnderstand
is yes
and no extension bundle is registered the engine complains during the deployment of the process model and refuses the execution of the process model. If mustUnderstand
is no
the engine logs a warning but continuous with deployment and execution. Unregistered extension activities are then executed like an <empty>
activity.
<extensionActivity> <anyElementQName standard-attributes> standard-elements </anyElementQName> </extensionActivity>
<assign validate="yes|no"? standard-attributes> standard-elements <extensionAssignOperation> assign-element-of-other-namespace </extensionAssignOperation> </assign>
In ODE extension activities and extension assign operations are grouped into so called Extension Bundles. Extension bundles are associated with an extension namespace and may provide several Extension Operations. Extension operations are the actual implementations of extension code and can be used for both, extension activities and extension assign operations.
Register the extension. Open /WEB-INF/conf/ode-axis2.properties
and add/uncomment the following lines:
ode-axis2.extension.bundles.runtime = fqcn.to.extension.bundle ode-axis2.extension.bundles.validation = fqcn.to.extension.bundle
The validation entry is only necessary if the extension bundle also provides compile-time validators
Start/Restart Apache ODE
Register the extension. Extract and open ode-jbi.properties from ODE SE and add/uncomment the following lines:
ode-jbi.extension.bundles.runtime = fqcn.to.extension.bundle ode-jbi.extension.bundles.validation = fqcn.to.extension.bundle
The validation entry is only necessary if your extension bundle also provides compile-time validators.
Re-add the properties file to the service engine archive and deploy it to the JBI container of choice.
TBC...