[rules-users] completing persisted workItem doesn't complete a process

gs76pl gstasica at pacemetrics.com
Tue Apr 12 04:38:08 EDT 2011


hi,

i've a very simple process with only 4 work items that run async. For steps
WI1 & WI2 i complete each step but when the process reaches WI3 step i
manually kill the whole process and then load it from a database 
i.e. 
ksession.loadStatefullSess..

Now after i complete WI3 step i can see that the last step i.e. WI4 gets
executed and marked as completed but when i'm checking my process status its
status is still ACTIVE instead of COMPLETED ?


ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(
			        mySessionId, getKnowledgeBase(), null, getEnvironment());

ProcessInstance processInstance = ksession.getProcessInstance(myProcessId);

//after below line i can see that WI3 & WI4 get completed
ksession.getWorkItemManager().completeWorkItem(workItemIdForWI3, null);


//here the process still remains as ACTIVE ie.1
processInstance.getState() == ProcessInstance.STATE_ACTIVE


what i've seen in the tables is that all tables (i.e. processinstanceinfo,
variableinstanceinfo,workiteminfo) excepts sessionInfo gets cleared after
completing WI3. Why despite completing all work items the process remains
ACTIVE when in fact it should be COMPLETED

--
View this message in context: http://drools.46999.n3.nabble.com/completing-persisted-workItem-doesn-t-complete-a-process-tp2810593p2810593.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list