-
1. Re: write a web service to invoke a process
kukeltje Sep 24, 2007 11:57 AM (in response to andydel)Andy,
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 -
2. Re: write a web service to invoke a process
andydel Sep 24, 2007 12:06 PM (in response to andydel)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).
many thanks
Andy -
3. Re: write a web service to invoke a process
kukeltje Sep 24, 2007 1:31 PM (in response to andydel)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. -
4. Re: write a web service to invoke a process
andydel Sep 25, 2007 4:07 AM (in response to andydel)Thanks for your help Ronald, it's much appreciated.
Andy -
5. Re: write a web service to invoke a process
vorsorge Sep 25, 2007 6:17 AM (in response to andydel)Hi Andy,
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)
Where:
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.
Martin -
6. Re: write a web service to invoke a process
kukeltje Sep 25, 2007 9:48 AM (in response to andydel)correct, this is kind of what I am implementing in general. target release is jbpm 3.3
-
7. Re: write a web service to invoke a process
burrsutter Sep 25, 2007 10:13 AM (in response to andydel)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.
Burr -
8. Re: write a web service to invoke a process
andydel Sep 26, 2007 4:23 AM (in response to andydel)Thanks all for your help this has really helped me to get onto the right track.
Andy