Hi Stefano,

On 7/12/07, Stefano <[EMAIL PROTECTED]> wrote:
>
> I'm new to openwfe (and to workflow teory in general ...) and I'm
> trying to understand the basis. Sorry if I ask something stupid.

Don't worry, I'll try to be as helfpful as I can.


> I'm trying to model a laboratory process where an operator executes
> some different job mainly in sequences. The jobs flow is a typical
> workflow which I can easily describe using patterns. For the sake of
> simplicity suppose the worflow is do_A, then do_B then do_C, the
> person who execute the different steps is always the same. In this
> context I can figure out what "participant" is, is it the operator who
> executes the steps or the steps themself ?

I'll play with an implementation idea. I'll use the Ruby process
definitions. Your process could look like :

---8<---
class LabProcess1 < OpenWFE::ProcessDefinition
    sequence do
        participant :ref => :lab_activity_A
        participant :ref => :lab_activity_B
        participant :ref => :lab_activity_C
    end
end
--->8---

But you can shorten it to :

---8<---
class LabProcess1 < OpenWFE::ProcessDefinition
    sequence do
        lab_activity_A
        lab_activity_B
        lab_activity_C
    end
end
--->8---

This latter notation doesn't use the 'participant' keyword, maybe it's
more readable in your case.

You have the opportunity to bind a participant per activity like in :

---8<---
engine.register_participant "lab_activity_.*" do |workitem|
    activity = workitem.participant_name[-1, 1]
    puts "doing activity #{activity}..."
    # a block participant implicitely replies to the engine after the block
end
--->8---

Note the usage of the regular expression to accomodate all the 3
participants in the process definition.


If you think to map participant to human participant you could do
something like :

---8<---
class LabProcess1 < OpenWFE::ProcessDefinition
    sequence do
        lab_operator :activity => "A"
        lab_operator :activity => "B"
        lab_operator :activity => "C"
        lab_supervisor :activity => "verify operation"
    end
end
--->8---

with participants like :

---8<---
engine.register_participant :lab_operator do |workitem|
    puts "lab_operator is doing activity #{workitem.params.activity}..."
end
engine.register_participant :lab_supervisor do |workitem|
    puts "lab_supervisor supervised."
end
--->8---

I'm using block participants for the sake of simplicity, of course you
can write your own or use the ones that ship with OpenWFEru :
http://openwferu.rubyforge.org/participants.html


Questions and feedback are welcome, best regards,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"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