On Wed, Feb 10, 2010 at 3:45 AM, Dave @ UPENN <[email protected]> wrote:
>
> argh actually that does work if i remove the |p|  sorry!
>
> But the real problem that I'm having is actually related to using this
> in rails.  I'm calling a method in a model called 'submission'  that
> has many 'tasks'

Hello Dave,

> the process definition dsl keeps thinking that the
> objects i'm calling in the process definition method are
> participants.

The code I write is never as smart as you write, it rather doesn't see
any binding for "task".

Please try that simple ruby program :

---8<---
tasks =%w[ task0 task1 taskC ]

def generate_definition
  p tasks
end

generate_definition
--->8---

Observe its result.

.

Maybe you're better off with something that looks like :

---8<---
require 'rubygems'
require 'ruote'

def generate_definition (name, tasks)

  Ruote.process_definition :name => name do
    tasks.each do |t|
      participant :ref => 'x', :task => t
    end
  end
end

p generate_definition('a', [ 'sending season cards', 'clean garage' ])
--->8---


Best regards, thanks for using ruote,

-- 
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