bexee Ant Tasks

bexee comes with Ant tasks to automate aspects of the build process inside ant. This includes two tasks for deploying and undeploying a BPEL process to and from bexee respectively and one task for starting very simple processes (the latter one is mainly to be used for demonstration purposes).

To use these tasks, you need

  1. Apache Ant [Ant]
  2. The library bexee-ant.jar which contains the tasks
  3. All the main bexee libraries (this includes all the libraries that are also required to run bexee)

Declaring the Tasks

To declare the tasks, set up a classpath to include the bexee task JAR and all the dependent libraries. Including everything in the bexee lib directory should suffice for this purpose.

<path id="bexee.classpath">
  <fileset dir="${bexee.home}/lib">
    <include name="**/*.jar" />
  </fileset>
</path>

Then use the <taskdef> declaration to declare all the tasks listed in a properties file inside the bexee-ant.jar file:

<taskdef resource="bexee-tasks.properties" classpathref="bexee.classpath" />

Deploying a BPEL process

The next sample uses the bexee-deploy task to deploy a new BPEL process to bexee.

The bpel, wsdl and url attributes are required, whereas the partnerwsdl attribute is optional, because there can be BPEL processes that don't need partner WSDL files, even though this probably wouldn't make much sense.

The first attribute is the location of the BPEL document. The second attribute is the location of the WSDL document that describes the BPEL process. The url attribute is the URL of the Manager Web Service and finally the <partnerwsdl> element defines a group of files (Ant FileSet data type) representing partner services.

<bexee-deploy
  bpel="${bpel.file}"
  wsdl="${wsdl.file}"
  url="http://localhost:8080/bexee/services/Manager">
  <partnerwsdl dir="${partner.wsdl.dir}" >
    <include name="**/*.wsdl" />
  </partnerwsdl>
</bexee-deploy>

Undeploying a BPEL process

Undeploying a BPEL process is even easier, as only the url to the Manager Web Service and the name of the BPEL process to undeploy is required.

The sample below uses the bexee-undeploy task to undeploy an existing process from bexee.

Both of the attributes are required.

<bexee-undeploy
  name="${process.name}"
  url="http://localhost:8080/bexee/services/Manager" />

Starting a BPEL process

The last task in bexee-ant.jar is the bexee-start task.

This task has large restrictions, as it only supports BPEL processes that accept one string as input and return a string. The bexee-starthas not been created to be use used in a wide range of applications, but rather just for simple demonstration purposes.

All three attributes are required.

<bexee-start
  url="http://localhost:8080/bexee/services/${process.name}"
  operation="{process.operation}"
  input="{process.input}" />