On Wed, May 26, 2010 at 02:39:44PM -0500, Wes Gamble wrote:
> 
> Here's the definition for my first workflow:
> 
>   @pdef = Ruote.process_definition :name => 'test_workflow' do
>       cursor do
>         participant 'koached'
>         participant 'rules_engine'
>         participant '${to}'
>         '${message}' == 'STOP' ? _break : rewind
>       end
>     end

Hello Wes,

quick initial reply to your set of questions.

There is some documentation about this at

  http://ruote.rubyforge.org/definitions.html

Your process definition is not parsed by the workflow engine, it's Ruby that is 
interpreted and generates a Ruote syntax tree.

Thus :

  require 'rubygems'
  require 'ruote'
  
  pdef = Ruote.process_definition :name => 'test' do
    cursor do
      participant 'koached'
      '${message}' == 'STOP' ? _break : rewind
    end
  end
  
  p pdef
    # => ["define", {"name"=>"test"}, [["cursor", {}, [["participant", 
{"koached"=>nil}, []], ["rewind", {}, []]]]]]

when "pdef = ..." is called the Ruby code is interpreted to generate the 
process definition.

Your process definition is thus equivalent to

  pdef = Ruote.process_definition :name => 'test' do
    cursor do
      participant 'koached'
      rewind
    end
  end

Because '${message}' == 'STOP' is never true.

The right way to write that is

  pdef = Ruote.process_definition :name => 'test' do
    cursor do
      participant 'koached'
      rewind :unless => '${message} == STOP'
    end
  end

See

  http://ruote.rubyforge.org/exp/cursor.html
  http://ruote.rubyforge.org/common_attributes.html


Now preparing the answer to the rest of your questions.


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