[jboss-user] [jBPM] - How to trigger an external signal event with a web service

Francois MARTIN do-not-reply at jboss.com
Fri Apr 6 09:48:51 EDT 2012

Francois MARTIN [https://community.jboss.org/people/nujib] created the discussion

"How to trigger an external signal event with a web service"

To view the discussion, visit: https://community.jboss.org/message/728668#728668


I am really new to Java and Jbpm so my questions may sound stupid. I designed a simple Process which looks like this : 

and what I'd like to do is to trigger the signal event using a web service. I have a main function initializing the knowledgeBase and starting my process just like the HelloWorld example. I just moved the initialiation step to another class called ProcessManager which holds a static ksession variable. Here is the aborescence of my project : 

My configuration is the following : 

     -     jBPM 5.2
     -     Eclipse Helios SR2 3.6.2
     -     Tomcat 6 with Axis 2

I already manage to create a webservice and integrate it into tomcat so that I can use SoapUI to make a call a get the result in the eclipse console. 
I tried to trigger the signal event by inserting the following piece of code into the exposed method of my WS : 

ProcessManager.ksession.signalEvent("receptionRetourOperat", 1);

The problem is that the ksession that is initialized in my main function is null when making the WS call. I guess the two executions (WS call and main) are done in a different context so that I can't get the initialized ksession variable from my WS call. My questions are the following :

- Is it possible to make the WS access the ksession variable from the main function ?
- Does it make sense to have only one jBPM session and to create a process instance at each WS call ?


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120406/c265e5da/attachment.html 

More information about the jboss-user mailing list