Changing a process instance in flight

4 views
Skip to first unread message

Enrico Bianco

unread,
Nov 6, 2009, 11:00:38 AM11/6/09
to ruote
A question that has come up in preparing to deploy ruote for our
application is what the best way is to handle a change in process. If
that change can simply be applied to all of the processes that are
launched from the time the new process definition is put in place,
that's easy, but what if the changes need to be applied even to
currently running processes?

Is it possible to change the process definition for an in-flight
process?

Thanks,
Enrico B

John Mettraux

unread,
Nov 6, 2009, 11:35:36 AM11/6/09
to openwfe...@googlegroups.com
On Sat, Nov 7, 2009 at 1:00 AM, Enrico Bianco <enr...@gmail.com> wrote:
>
> what if the changes need to be applied even to
> currently running processes?
>
> Is it possible to change the process definition for an in-flight
> process?

Hello Enrico,

for ruote 0.9.x, the methods for changing process definition in-flight
are available from this mixin for the Engine class :

http://github.com/jmettraux/ruote/blob/master/lib/openwfe/engine/update_exp_methods.rb

This old and cryptic piece of test might help :

http://github.com/jmettraux/ruote/blob/master/old_test/ft_84_updateexp.rb

ruote-rest (and ruote-web2 IIRC) have a fancy looking integration of
the ruote 0.9.x mechanism, revolving around :

http://github.com/jmettraux/ruote-rest/blob/master/lib/res/expressions.rb#L40-49


For ruote 2.x, you usually get the target expression via

http://github.com/jmettraux/ruote/blob/ruote2.0/lib/ruote/engine/engine.rb#L149-162
http://github.com/jmettraux/ruote/blob/ruote2.0/lib/ruote/engine/process_status.rb#L28-37

and then modify it (and then save it) via

http://github.com/jmettraux/ruote/blob/master/lib/openwfe/engine/update_exp_methods.rb

this is a related example, where a stalled expression is updated
before being re_applied :

http://github.com/jmettraux/ruote/blob/ruote2.0/test/functional/ft_14_re_apply.rb#L115-117


Note that such modifications are a bit risky, they are problably
better not left to the casual "business user", unless your system
user-proofs the function. One has to know how ruote deals with process
instances and their expressions :

http://jmettraux.wordpress.com/2008/09/07/how-does-ruote-work/

I'd suggest playing a bit with the functionality on a test /
sacrificial instance to get to know it.


Further questions are welcome.

Cheers,

--
John Mettraux - http://jmettraux.wordpress.com

Reply all
Reply to author
Forward
0 new messages