[rules-users] drools flow - why after reloading some process previously completed workItems gets executed once again?

Esteban Aliverti esteban.aliverti at gmail.com
Wed Apr 6 12:15:41 EDT 2011


If your WorkItems take so long, they must be asynchronous. If they are
asynchronous, the state of the process is persisted after the WIHandler is
invoked. If your system crashes after WI1 was invoked, then an external
system (the one the WI is communicating with) received a signal to start its
work. When the external system completes its task it should notify the
process (you have to implement this). If the process crashed after WI1 was
executed and is restored before the external system returns, then the
scenario is just like with the HT. The problem is if the external system
returns BEFORE the process is restored. What you can do in that case is to
put a JMS queue between the external system and the process engine. This way
you will not loose any message. Of course, this is just one way to do it.

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Apr 6, 2011 at 12:38 PM, gs76pl <gstasica at pacemetrics.com> wrote:

> ok, you're right about the ht node i.e. once i completed the task using
> reloaded sessionId the process has progressed to the next node.
> The problem i have though is that i don't think it's enough (unless my
> understanding is incorrect). Say for a process like below:
>
> Start -> WorkItem1(takes 1 hour to complete) -> WorkItem2 (takes 20 min to
> complete) -> HumanTask -> Stop
>
> 1. if my server crashes during WorkItem1 or WorkItem2 there is no way for
> me
> to know that after my server has been restarted i should start the process
> again (ok i could have some other table that would check if a process has
> been completed)
> 2. if my server crashes after WorkItem1 but before completing WorkItem2
> than
> i don't really know how i should restart my process. Since WorkItem1 takes
> 1hour to complete it would be a total overkill for the application to run
> it
> once again.
>
> That said i'd assume that there should be some way of restarting a process
> from a specific point i.e. as for point 2, the process should skip
> WorkItem1
> and start to run WorkItem2. Otherwise only HumanTask are the nodes in a
> process that could restart a process from a specific node
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/drools-flow-why-after-reloading-some-process-previously-completed-workItems-gets-executed-once-again-tp2784850p2785544.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110406/b15065ba/attachment.html 


More information about the rules-users mailing list