On Fri, Apr 10, 2009 at 9:55 PM, harshal <[email protected]> wrote:
>
> I was trying around '_if' expression of 'Ruote'.
> At one point I felt that the implicit 'then' and 'else' can be
> improved a little further.
>
> Is it a good idea ?
>
> _if do
>  equals :field_value => :x, :other-value => "y" do
>    _then do
>      participant :theodor1
>      participant :theodor2 # Note second participant here
>    end # 'then' is handled explicitly
>
>    _else do
>      participant :emma
>    end # 'else' is handled explicitly
>  end
> end

Hi Harshal,

if you really need that, you could alias the "sequence" expression to
"then" and "else" :

  
http://github.com/jmettraux/ruote/blob/40ebd454af2e709a0a8a131f3127bfb01b8acfb4/lib/openwfe/expressions/fe_sequence.rb#L50

  --> names :sequence, :then, :else

I prefer to always force the definition author to use an explicit 'ordering' :

_if :test => "${f:x}", :value => "y" do
  sequence do # then
    participant :theo1
    participant :theo2
  end
  concurrence do # else
    participant :emma
    participant :fedor
  end
end


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