I ran into this issue also. I was told that the ProcessInstance you are looking at is just a snapshot of what was loaded from the DB. It doesn't get updated after being loaded. I wasn't told why this was the behavior, just that it was expected. Didn't seem intuitive to me. I was told that the way to check for process completion is to try to load the process from the DB again and if it is null, then it is complete. I didn't like that solution so I wrote a ProcessEventListener to detect process completion because I needed to send a JMS message.
Regards, Dan Nathanson On Tue, Apr 12, 2011 at 7:18 AM, gs76pl <gstas...@pacemetrics.com> wrote: > for those interested the problem was that i misinterpreted ProcessInstance > object as something that always gets updated whenever underlying process > changes, whereas in fact that's the version of a process obtained at the > specific moment. This is especially true while working with persistence. So > the bottom line is that in order to check process status the best way to do > it is to create ProcessEventListener object and add it to the created > session.... > > similar thread http://comments.gmane.org/gmane.comp.java.drools.user/24622 > > -- > View this message in context: > http://drools.46999.n3.nabble.com/completing-persisted-workItem-the-last-in-a-process-doesn-t-complete-a-process-tp2810593p2811574.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users