Here is an example that shows the usage of local task service instead of using Mina server as shown in http://community.jboss.org/people/bpmn2user/blog/2011/04/03/jbpm5-human-task-api-usage-example.
This approach would give the ability to run the both task service and BPM processes in the same JVM, i.e., it does not require over the network Mina task service execution calls.
This example requires JBPM5.2 release.
How to install and run this example?
Start with the JBPM plug-in setup as shown in http://community.jboss.org/people/bpmn2user/blog/2011/02/27/eclipse-plug-in-installation-for-jbpm5. Make sure jBPM5.2 libraries are used. Import the attached files into a JBPM project as shown below.
Here is a simple human task that is processed using local task service.
A local task service can be created as shown below.
A task can be started and completed using the API as shown below. It has a few API changes. For example
Following results can be seen after running the example successfully.
Update for the version 5.4:
This example has been modified for the version 5.4 and included in the attachment JBPM5.4LocalTaskExample.zip.
It has a few API changes. For example, SyncWSHumanTaskHandler in JBPMAPIUtil.java is replaced with LocalHTWorkItemHandler.