jBPM has an api (plain java) and an command interface (e.g. via jms or ejb) if you know how to call java from a webservice it is straight forward (with some transaction things) If you do not know how to call java from a (java?) webservice, please look into that first
Thanks for your reply. Would that be the usual way to run a process as a web service, from what you are saying I could write a web service and deploy that and then nudge tasks along etc from that web service using the API?
I was looking at Intalio which allows you to create a web service and map the task variables to the web service therefore effectively exposing the process as a web service. Is something similar possible in JBPM or would you have to take the above approach?
I'm very new to JBPM and BPEL etc so exuse me if I'm missing something obvious (which I feel I am at the moment).
It would indeed be the usual way to expose any api as a webservice. So no mapping etc... A kind of default webservice api like the commands in jBPM. (i'm working on this now and then, but not much to checkin yet)
If you want some kind of mapping etc... I'd propose to use the esb which is great for mappings/transformations etc.
Thanks for your help Ronald, it's much appreciated.
just to give you some idea what we did in the same situation.
We wrote some Java classes with the basic methods we want to use for our Jbpm processes:
- JbpmServiceReturnValue startProcess(User user, String processName, HashMap<String, Object> inParameter) - JbpmServiceReturnValue resumeProcess(User user, String processName, long processID, String calledTransition, HashMap<String, Object> inParameter) - JbpmServiceReturnValue readProcess(User user, String processName, long processID)
JbpmServiceReturnValue is a class wich contains data from the process call like:
- process ID
- if process is suspended: Resumable transitions
- Process ErrorCodes and Messages
- ... some more ...
inParameters are a hash map. Its entries will be inserted in the ContextInstance as process variables.
This classes also handle the user authorisation before we even start the process.
We exposed this classes as our WebService interface for our Business Process Server. This is easy to use from all our applications.
Just to give you an architectural idea.
correct, this is kind of what I am implementing in general. target release is jbpm 3.3
This not specifically a web service for command API of jBPM but...
the JBoss ESB has implemented core jBPM 3.2.x which means you can expose jBPM APIs (deploy, create/start, signal, update vars) as JBoss ESB Services. JBoss ESB Services can be exposed to the outside world as JMS, FTP, File drop, WS, etc.
So for example, you can start a new process instance via an FTP event (e.g a new order arrives on our FTP server), signal the process instance via a WS and update the process vars via a JMS message. At least this is the goal and the code is in place, just requires more feedback from users.
Thanks all for your help this has really helped me to get onto the right track.