lib/ruote/workitem.rb
# Sometimes a value is passed as a[n expression] parameter or as a
# workitem field, with priority to the parameter.
#
#   sequence do
#     set 'f:country' => 'uruguay'
#     participant 'toto'
#       # in toto, workitem.param_or_field(:country) will yield 'uruguay'
#     participant 'toto', :country => 'argentina'
#       # workitem.param_or_field(:country) will yield 'argentina'
#   end
#
Sometimes a value is passed as a[n expression] parameter or as a
workitem field, with priority to the parameter.


Sometimes a value is passed as a [ n expression ] parameter or as a workitem field with priority to the parameter .
def param_or_field(key)
      key = key.to_s
      (h.fields['params'] || {})[key] || h.fields[key]
    end
def param_or_field ( key ) key = key . to_s ( h . fields [ 'params' ] || { } ) [ key ] || h . fields [ key ] end
Sometimes a value is passed as a[n expression] parameter or as a
workitem field, with priority to the parameter.
Sometimes a value is passed as a [ n expression ] parameter or as a workitem field with priority to the parameter .
key