Hello,
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 ?
Thanks.