On Thu, May 02, 2013 at 06:26:18AM -0700, Lukas Loesche wrote:
>
> (...)
>
> I figured I could do something like
> deploy_entire_frontend = %q{
>   set artifact_id: foo
>   set version: 4.2.9-SNAPSHOT
>   deploy_package
>   set artifact_id: bar
>   set version: 3.1.10
>   deploy_package
> }
>
> But even though it works, this feels very wrong. Esp. since I have more
> like 10 workitem fields that deploy_package is working with and not just
> two like in this example and I'd like to keep the process definition free
> of field values.
>
> What would be a proper way to do this?

Hello,

I just updated the doc at:

  http://ruote.rubyforge.org/exp/subprocess.html

That information was missing (only present in tests), but you can do:

```ruby

  def test_atts_to_fields

    pdef = Ruote.define do
      set 'address' => { 'city' => 'boston' }
      subprocess(
        'sub0',
        'f:a' => 'fa',
        'field:b' => 'mi',
        'var:c' => 'sol',
        'f:address.city' => 'nyc')
      sub0(
        'f:a' => 'fa',
        'field:b' => 'mi',
        'var:c' => 'sol',
        'f:address.city' => 'nyc')
      define 'sub0' do
        echo '${a} ${b} ${v:c} ${address.city}'
      end
    end

    wfid = @dashboard.launch(pdef)
    @dashboard.wait_for(wfid)

    assert_equal "fa mi sol nyc\nfa mi sol nyc", @tracer.to_s
  end
```

So this should be OK:

```ruby

  deploy_entire_frontend = %q{
    deploy_package "f:artifact_id": foo, "f:version": 4.2.9-SNAPSHOT
    deploy_package "f:artifact_id": bar, "f:version": 3.1.10
  }
```

Best regards,

--
John Mettraux - http://lambda.io/jmettraux

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to