-
1. Re: Question about using Timer node
marco.rietveld Dec 14, 2011 4:30 AM (in response to cross.cy)Yu,
Which version of jBPM are you using?
Also, if you're using jBPM 5, what are you doing with the knowledgesession when the timer is waiting?
Thanks,
Marco
-
2. Re: Question about using Timer node
cross.cy Dec 14, 2011 6:20 PM (in response to marco.rietveld)Hi Marco,
I'm using jBPM5.1.
In the work flow, I have a rule node to define the delay time for the timer. After timer expires, I'm doing a soap web service call. So there's nothing sepcial I'm doing with the knowledgesession while the timer is waiting.
I also did a test work flow in which a timer sits in between two simple script task nodes. When I started it in a simple java app, it worked well. However when i put it in my project, which runs in JBoss and triggers the work flow after a jms comes in, the work flow cannot be resumed after the timer expires.
Thanks and regards
Yu
-
3. Re: Question about using Timer node
cross.cy Dec 18, 2011 7:41 PM (in response to cross.cy)Hi all,
Any more comment on this? I'm using Seam2.2.0 and the knowledge session is created from JPAKnowledgeService. I tried to not use JPA to create the session but the timer still didn't fire.
Is there any configuration in particular that I need to do for jBPM timer to run in seam?
Best regards
Yu
-
4. Re: Question about using Timer node
marco.rietveld Dec 19, 2011 5:05 AM (in response to cross.cy)Yu,
There are two things I can think of that might be happening:
- the timer can not/will not fire if there is no (knowlege) session present and linked to the process instance.
- in some cases, if the node before the timer node (or after) is not correct and fails, that exception is sometimes not shown and the process can silently die.
Would you mind posting of the bpmn of the three nodes: the one before the timer, the timer node and the one after the timer?
Thanks,
Marco
-
5. Re: Question about using Timer node
cross.cy Dec 19, 2011 4:57 PM (in response to marco.rietveld)Hi Marco,
Thank you very much for the suggestion. I think the first point addressed my issue exactly. I reviewd my project code and test java code and found in my project code i called ksession.dispose in "finally" satement but in test code I didn't. After i removed the finally statement it worked! Apparently the ksession has been disposed before the timer expires.
Ksession.dispose() is needed to recycle the memory. So could you please suggest where the best place is to dispose the ksession?
Meanwhile, given the fact ksession needs to be alive for the timer to trigger, can I trigger the timer in an asynchronous way? So that when timer expires the ksession can be resumed using JPAKnowledgeService to continue the process instance.
Thanks again Marco!
Best regards
Yu