-
1. Re: Timer triggered more than it should after an exception (infinite loop some times).
milhaim May 23, 2012 10:10 AM (in response to milhaim)feel free if you need any more information
-
2. Re: Timer triggered more than it should after an exception (infinite loop some times).
swiderski.maciej Jun 1, 2012 12:57 PM (in response to milhaim)What I think is happening is:
- timer works according to expectations - you can observe that by looking at number of step 1 node executions
- every trigger of business rule task register listeners to be notified on rule execution
- in case rule throws an exception it is not successfully executed meaning that listener is not signaled
- as soon as the other process instance is started and goes into business rule task that is successfully executed with trigger all event listeners as they are matched based on ruleflow group name
So depending on number of business rule task instances that were created with failing rule, you should see that number + 1 triggers of step 2 node.
IMHO you should never thrown exception from the rule as that causes not predictable results.
HTH
-
3. Re: Timer triggered more than it should after an exception (infinite loop some times).
milhaim Jun 14, 2012 12:06 PM (in response to swiderski.maciej)Hi Maciej,
Many thanks for your help , I was trying to upgrade to jbpm 5.3 but I got some issues (hibernate with postgres).
For this issue :
- I'm throwing an exception from the rule just for test (this issue could happen in real life) and I understand I should not throw exceptions from rules.
- In step 1 in the process definition a have this script action: System.out.println("PROCESS step 1 "+kcontext.getProcessInstance()... I have this log trace many times in 60 second (timer period) and some times it does not stop(I should have only one).
Here some logs :
2012-06-14 16:28:49,812 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance6 [processId=LoopBug,state=1] : after timer triggered : 3
2012-06-14 16:28:49,814 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 6
2012-06-14 16:28:49,819 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,834 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance11 [processId=LoopBug,state=1] : after timer triggered : 4
2012-06-14 16:28:49,836 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 11
2012-06-14 16:28:49,840 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,855 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance16 [processId=LoopBug,state=1] : after timer triggered : 4
2012-06-14 16:28:49,857 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 16
2012-06-14 16:28:49,861 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,875 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance1 [processId=LoopBug,state=1] : after timer triggered : 6
2012-06-14 16:28:49,878 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 1
2012-06-14 16:28:49,883 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,896 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance6 [processId=LoopBug,state=1] : after timer triggered : 4
2012-06-14 16:28:49,899 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 6
2012-06-14 16:28:49,903 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,915 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance11 [processId=LoopBug,state=1] : after timer triggered : 5
2012-06-14 16:28:49,918 INFO [STDOUT] (pool-16-thread-1) Fire all rules for process instance: 11
2012-06-14 16:28:49,922 INFO [STDOUT] (pool-16-thread-1) PROCESS Step 2: after rules validated :
2012-06-14 16:28:49,936 INFO [STDOUT] (pool-16-thread-1) PROCESS step 1 WorkflowProcessInstance16 [processId=LoopBug,state=1] : after timer triggered : 5
2012-06-14 16:28:49,940 INFO [STDOUT] (pool-16-thre
step 1 is executed 30 time for each process instance in less than 2 seconds.
The complite log file (end of the file)
-
server.log.zip 39.1 KB
-