On Mon, Feb 2, 2009 at 3:25 PM, Keisuke Yamane <[email protected]> wrote:
>
> ------------------------------------------------------------------------
> Q1: Can we change process definition as dynamically?
> ------------------------------------------------------------------------
>
> (...)
>
> After lunching this process, can user(or owner of proc) change this process
> dynamically? like below..
>
> #=== sample process definition 2 ===
> class PicSelectionProcess < OpenWFE::ProcessDefinition
>  sequence do
>   get_pictures
>   concurrence :merge_type => 'mix' do
>     user_alice ## <== now process stopping here!!
>     user_bob
>     user_charly  ## <== add this participant after lunching!
>   end
>   show_pictures  ## <== add this participant after lunching!
>  end
> end
> #=== until here ==================

Hello Keisuke, welcome to the Ruote mailing list,

yes, it's possible to modify a process instance dynamically.

Unfortunately, while it's possible to add participant "show_pictures",
it's not possible to add participant "user_charly" since it belongs to
a concurrence which will have already fired (since the process is
stopped at "user_alice" *and* also at "user_charly"). So all my
explanations focus only on adding "show_pictures".

I also assume you are using a file persisted engine.


1a). manually :

- stop the engine
- locate the expression for the sequence, the file will look like
http://gist.github.com/56816
- edit the file to make it look like http://gist.github.com/56817
- restart the engine

the stop/restart is necessary since most of the time a persisted
engine will cache [recently used] expressions.

Note that the upcoming ruote (0.9.20) will by default store
expressions in a binary format, not YAML, but there will be a tool
(pooltool.rb) for transforming from one format to the other and back.


1b). manually with the web interface (ruote-rest only) :

http://dl.getdropbox.com/u/76595/dynmod.png

ruote-rest (http://github.com/jmettraux/ruote-rest) allows easy
in-flow process modification. This capability will soon be "ported" to
ruote-web2 (http://github.com/jmettraux/ruote-web2).


2). programmatically :

you can write ruby code to modify the running process instance, I've
pasted an example here :

http://gist.github.com/56813


> ------------------------------------------------------------------------
> Q2: Can we add new user or change user's group after launching?
> ------------------------------------------------------------------------
> This point is correspond with Q1.
> New user who signed up after launching a process, can join the
> launched process's participant?

It really depends on how you implemented / integrated ruote. As a Ruby
gem, ruote provides no "user management" nor "user concept".
Ruote-rest has no user concept either, but ruote-web2 has a system of
users and groups. Users belonging to a group may see all the workitems
attributed to a group, even if they were created after the workitem
reached the workitem store.


> If there are any result docs or web pages like these very simple and
> beginner's questions,
> Please let me know.

In-flow process modification is not that easy ;) Most of the time it's
better to have dynamic processes (and sub-processes) than dynamically
modifying processes.


Best regards,

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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ruote (OpenWFEru) users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to