Hi krassib, there is currently support for using Activiti as a process manager (and more):
http://git.springsource.org/spring-i...ation-activiti this code supports two use cases:
- process manager (e.g, launching processes when a message is received). There is support for sending message headers back and forth as process variables, etc, too.
- letting Spring integration do the heavy lifting when an activiti process reaches a certain state. (in this setup, the activiti process "sends" an inbound message to your Spring Integration code through an inbound Activiti gateway. You then have the ability to react to the message and do whatever you'd like in response to the state change. Finally, once you've completed doing whatever integration logic you'd like from Spring Integration, you can send a reply message, causing the business process to resume (essentially, it "signals" the process). Note when Activiti 'hands off' the state to Spring Integration, it passivates, so there's no state kept or anything, and it thus doesn't matter if you return immediately, or a year later. It's asynchronous and respects the contract of a workflow state.
Both use cases are demonstrated in the test cases in that code I linked you too. The code itself has achieved a fair amount of stability / maturation, though if you encounter any problems or have any questions, please feel free to post back here and we'll happily follow up.