[rules-users] Resuming a simple process involving human task

tolitius webakaunt at gmail.com
Tue Apr 13 15:02:20 EDT 2010


@Touma,

    There are a couple of ways to resume the flow:

         1. Complete a work item that causes the process to wait.

         2. Post (signal) the event, which is a different thread, hence can
restart / resume the flow at any point.

    In your case, as Vijay pointed out, you would have to complete a work
item. However you don't have to rely on MinaServer / Client to do that. The
out of the box WS-HT Drools Flow implementation is tightly coupled with
MinaServer (it is not pluggable with any other solutions), hence you would
have to create your own WorkitemHandler to do that.

    If you already have all the IDs ( session, work item, etc.. ), it should
be as simple as:

                // re-load the session
		ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(
YOUR_SESSION_ID, knowledgeBase, null, env );
		
                // DON'T FORGET TO RE-REGISTER ALL THE WORK ITEM HANDLERS
HERE...
		
                // complete the work item
		ksession.getWorkItemManager().completeWorkItem( YOUR_WORK_ITEM_ID, null );

Good Luck,
/Anatoly
-- 
View this message in context: http://n3.nabble.com/Resuming-a-simple-process-involving-human-task-tp716250p716867.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list