Eric D. Schabell: Using Ant task to deploy jBPM process to running JBoss server

Tuesday, September 21, 2010

Using Ant task to deploy jBPM process to running JBoss server

This question pops up quite a bit in development shops that don't happen to be using Maven (they are still out there) for whatever reason. They are looking to deploy their JBoss jBPM process definitions straight from their projects into a running JBoss server for testing.

Note that this is facilitated also in the tooling provided by JBoss. In your project you can use the tab marked 'Deployment' when viewing your process definition to directly deploy it into the server (see included image). This might be too many point and clicks for some of you so the Ant task will give you an alternative.

There is a task definition to deploy your process to the server, then using this you can deploy an set of process definitions by pointing to a directory or you can specify the process files directly. See below for first the directory deployment example and then the specific file deployment example (from the JBoss examples orchestration 4 project):   

Deploy process definitions from a directory

  Deploy the process definition

Deploy process definitions from individual files

  Deploy the process definition
Thee is a bit of complexity here with regards to the jBPM console login and password being passed via variables, but hopefully the XML is clear enough. Finally, don't forget when deploying processed one file at a time, that you first deploy all sub-processes before a process archive that needs them! ;-)
A final note, this was made available from jBPM v3.2.2 onwards.