jmettraux / ruote

a ruby workflow engine (dead)
MIT License
496 stars 74 forks source link

engine variables not accessible via $v: lookup (in plain attributes) #80

Closed jmettraux closed 11 years ago

jmettraux commented 11 years ago

Cf https://groups.google.com/forum/?hl=en_US&fromgroups#!topic/openwferu-users/XZTcBLWNTJY

Only "d:" echoes:

require 'ruote'

ruote =
  Ruote::Dashboard.new(
    Ruote::Worker.new(
      Ruote::HashStorage.new))

ruote.noisy = (ENV['NOISY'] == 'true')

ruote.variables['props'] = { 'key' => 'value' }

pdef =
  Ruote.define do

    echo "a:"
    echo "$v:props.key"

    echo "b:"
    echo "${v:props.key}"

    echo "c:"
    echo "${v://props.key}"

    echo "d:" # the one that works
    set "v:propz" => "$v:props"
    echo "$v:propz.key"
  end

#
# run process
#

wfid = ruote.launch(pdef)

r = ruote.wait_for(wfid)
  # exit the ruby process only when process is over or got into an error

Tested on master at 502ad0d, Ruby 1.9.3p194 on SnoLeo.