WSO2 BPS - Extensions - Activity Failure and Recovery

Activity Failure and Recovery

BPEL Extensibility

Since BPEL 2.0, it is possible to extend the language by user-defined activities and custom variable assignment mechanisms. WSO2 BPS (>= 1.1.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:



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.

Using BPEL Extensibility in WSO2 BPS

Warning: WSO2 BPS version
BPEL extensions are only available in WSO2 BPS 1.1.x.

In WSO2 BPS, 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.

Installation of Extensions

Copy the extension jar to BPS_HOME/repository/components/lib directory. Then add a configuration entry to bps.xml in BPS_HOME/conf directory.

    <extensionBundles><runtimes><runtime>org.wso2.bps.samples.extension</runtime></runtimes><validators><validator>class name of the validator</validator></validators></extensionBundles>

Developing Extension Bundles

You can find a sample extension implementation here.