-
1. What's the easy way to call native or external tools in jBPM5?
salaboy21 Feb 21, 2011 6:26 AM (in response to alartin)Hi Sean,
You can try Apache Camel too. I'm not sure if ANT APIs inside a work item it's the best alternative, but feel free to try.
Greetings.
-
2. What's the easy way to call native or external tools in jBPM5?
alartin Feb 21, 2011 8:43 AM (in response to salaboy21)Hi Mauricio,
Thanks for the quick reply. While Apache Camel has exec adaptor for external tools, I think it is still too heavy for my case. Meanwhile, I would like to follow JBoss Stacks (Seam, HornetQ, jBPM, etc) and keep Web Service away to make things simple. Another soluiton may be using Groovy scripts to call Apache Ant (Gant, a powerful groovy wrapper for Ant) exec task.
I am not sure jBPM5 supports Groovy script well or not. Any examples?
Thanks.
-
3. What's the easy way to call native or external tools in jBPM5?
salaboy21 Feb 21, 2011 8:49 AM (in response to alartin)You can create a work item that execute groovy scripts and that will probably works for you.
Or you can just call ant apis directly from the work items.
Greetings.
-
4. What's the easy way to call native or external tools in jBPM5?
krisverlaenen Feb 21, 2011 9:35 PM (in response to alartin)Work items are indeed the recommended way to communicate with external applications / tools (to avoid having to encode all this logic in script nodes inside your process). We have a work item implementation that might be useful, it all depends on what communication channels the application you are trying to invoke supports.
ExecWorkItemHandler allows you to call console commands using org.apache.commons.exec
If this examples can be used out-of-the-box in your case, they should at least give you an idea on how to setup integration with your services using a custom handler. I could for example see a similar ant work item that allows you to call ant targets. We're hoping to extend the set of supported work item handlers for jBPM 5.1, with the help of the community
Kris
-
5. What's the easy way to call native or external tools in jBPM5?
alartin Feb 21, 2011 10:50 PM (in response to krisverlaenen)Hi Kris,
Thanks for the tips. I've also found the exec workitem. It is great! And I will also implement and contribute an Ant target workitem since it is more powerful (build file can contain some minor and fixed process and its exec task with other advanced features of Ant such as batch mode and paralleling can do much than just apache commons.exec).