On Mon, Jul 13, 2009 at 6:47 PM, Li Xiao<[email protected]> wrote:
>
> I did lots of research, but still can't get how to simply define a
> process with back/jump to participant easy.
>
> In my case, every participant could decide back to any participant
> completed before, which may looks like this:
>
>  OpenWFE.process_definition :name => 'pdname' do
>    cursor do
>      participant 'a'
>      participant 'b'
>      jump :step => 0, :if => "${f:back_to_a}"
>      _if :test => "${f:xxx}" do
>         participant 'c'
>         jump :step => 0, :if => "${f:back_to_a}"
>         jump :step => 1, :if => "${f:back_to_b}"
>      end
>      participant 'd'

Hi Li Xiao,

the feature you're requesting has been implemented, but in ruote2.0 :

  
http://github.com/jmettraux/ruote/blob/709f0dc881a75e47ac7eabd1deeed0e386090639/test/functional/eft_14_cursor.rb#L72-86

If you really need it, I can backport it to the 0.9.x line.


With ruote 0.9.x, what about something like :

---8<---
OpenWFE.process_definition :name => 'test' do
  sequence do

    set :field => 'next_participant', :value => 'a'

    repeat :break_if => '${f:next_participant} not set' do
      participant '${f:next_participant}'
    end
  end
end
--->8---

where the loop (repeat) breaks when the field next_participant has no value set.

You can maybe model your process by nesting cursors and using "rewind" :

---8<---
OpenWFE.process_definition :name => 'test' do
  cursor do
    cursor :rewind_if => '${f:result} == wrong' do
      a
    end
    b
    rewind :if => '${f:result} == wrong'
    cursor do
      c
      rewind :if => '${f:result == wrong}'
      d
    end
  end
end
--->8---


Hope this will help, 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