Hi again,

I've tried to use "get_flow_expression" within a block participant in
'conf/participants.rb' but it doesn't seem to work.
The participant fails during workflow execution with a: undefined
method 'get_flow_expression' for #
Maybe I'm missing something...

  RuoteRest.engine.register_participant :decide_validation do |
flow_expression, workitem|
    fe = get_flow_expression(workitem)
    puts fe
  end

I've also seen some docs about block participants (http://
openwferu.rubyforge.org/participants.html#BlockParticipant)
where it is stated that a block participant can take up to two
parameters, flow_expression and workitem. Would it be possible to
access
workflow variables from the flow_expression param?

Thanks for the help.
Best regards,

Gonzalo.






On Sep 9, 10:30 am, John Mettraux <[email protected]> wrote:
> On Wed, Sep 9, 2009 at 5:18 PM, Gonzalo<[email protected]> wrote:
>
> > Would it be possible to access workflow variables from the decision
> > participant context? If not, how could I use workflow variables?
> > Aren't workflow variables good for doing this kind of things?
>
> Hi Gonzalo,
>
> you have a point, process variables are kept to the engine and not
> propagated to [external] participants. Makes sense.
>
> If anyway you'd like to access variables from a custom participant
> (that includes the LocalParticipant mixin), you can do something like
>
> ---8<---
> class MyParticipant
>   include OpenWFE::LocalParticipant
>
>   def consume (workitem)
>     fe = get_flow_expression(workitem)
>     puts fe.lookup_variable("toto") # <---
>     reply_to_engine(workitem)
>   end
> end
> --->8---
>
> BlockParticipant instances do include LocalParticipant, so
> get_flow_expression(wi) is available to them.
>
> Best regards,
>
> --
> John Mettraux   -  http://jmettraux.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to