Integrating Activiti BPM with JMS
Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. However, its standard version doesn’t allow you to integrate with your existing enterprise technologies (e.g. your JMS broker). In this post we will briefly explain how to integrate Activiti with JMS using Mule’s Activiti Module.
First, you will need to run Activiti in embedded mode inside your Mule application; it is pretty similar to run Activiti inside Spring. An example configuration is shown next; you will need to define your processEngineConfiguration and the service beans you can obtain from it:
Then you will also need to define your JMS broker; in our case we will use Active MQ:
Finally, your Mule’s Activiti connector:
We are ready!
For our example, let’s suppose we have a process for managing orders that waits for the approval of a manager. The manager approves them by submitting a message to the JMS queue approveQueue. To resolve which process needs to be approved the message must contain the process id and the username which will be set in the approvedBy variable. For the sake of conciseness, we will create the process from Mule as shown next:
This process will start and wait for a message in the JMS queue to signal it. This can be easily solved from the Mule side by specifying a flow that reads from a JMS queue, sets the variable approvedBy and signal the process as shown next:
Want to see the full example? Check our git hub repository for Activiti examples. Hope you want to start integrating Activiti with your existing enterprise environment using Mule’s Activiti Module and I look forward to your comments.
Related posts:
- New version of the Activiti module released!
- Announcing Mule’s Activiti transport
- MuleSoft joins Activiti BPM project
- Activiti + Mule ESB – Part 1




Great post! How can this integration module send message to a JMS queue as a send task defined in the activiti bpmn2 process?
Hi,
You can send messages to any mule endpoint using the approach shown in http://www.webspeclanguage.org/esteban/2011/05/did-your-business-people-fall-in-love-with-salesforce-if-so-integrate-with-it-from-activiti/
It will be available in Activiti 5.6!
Cheers
Esteban
3.1.0
5.8
3.2.0
muleforge-repo
MuleForge Repository
http://repository.muleforge.org
default
Gives me errors.
27/11/11 20:06:15 GMT: Maven Builder: AUTO_BUILD
27/11/11 20:06:20 GMT: Refreshing [/mule-module-activiti-jms/pom.xml]
27/11/11 20:06:21 GMT: Missing artifact org.activiti:activiti-engine:jar:5.8:compile
27/11/11 20:06:21 GMT: Missing artifact org.apache.commons:commons-email:jar:1.2:compile
27/11/11 20:06:21 GMT: Missing artifact javax.mail:mail:jar:1.4.1:compile
27/11/11 20:06:21 GMT: Missing artifact javax.activation:activation:jar:1.1:compile
Sorry, to expand….I’m trying to use your configurations in your github project…and it gives me the errors I showed above.