As EasyBPEL is based on EasyVIPER, an extended behavior is expected to be developed for each extended activity in EasyBPEL.
First we consider an extended behavior is available (see the specific how-to on EasyVIPER page).
The following figure shows this principle of EasyBPEL activity mapped into an EasyVIPER behaviour. For the Invoke activity defined in the BPEL specification, a corresponding Send behavior has been implemented in EasyVIPER. In a same way, any extended activity defined at EasyBPEL level corresponds to an extended behavior at EasyVIPER level.
First of all, an XSD schema must be created, corresponding to the extended activity. In particular, you must create a type that extends the Extended activity type defined in the BPEL 2.0 specification.
This schema must be able to generate Java source code. The following excerpt is a way to do that thanks to a maven plugin:
Here is an example of binding.xjb:
An extended activity implementation must then be composed of a JAVA interface extending the ExtendedActivity interface:
An abstract class should be created, extending the AbstractExtendedActivityImpl abstract class and implementing the interface above.
Here is an example:
A JAVA class must implement the MyExtendedActivity interface and extend the MyExtendedActivityPackageExtendedActivityImpl abstract class:
You have to fill the constructor (at least with a super() method), the convertElementToModel(), validate() and generate() methods.
The validate method SHOULD be filled whereas the generate method MUST be filled. It consists basically in instantiating the extended behavior developed at EasyVIPER level. Here is an example of generate method:
Your extended activity is completed. You only needs to add it in dependency of your BPEL engine and to set or create an ExtendedActivityInitialization.xml file that can be found for instance in the src/main/jbi of the JBI component that embeds EasyBPEL.
You can see in definition a file is set, that must be present in the extended activity project and that contains configuration. This configuratioon file details what is the namespace of the extended activity, and for each activity of this namespace, the tag associated to the extended activity (in the taken example, there was only one extended activity).