workflow = Workflow.find? template_uuid
if workflow.definition
begin
- wf_json = ActiveSupport::HashWithIndifferentAccess.new YAML::load(workflow.definition)
+ wf_json = ActiveSupport::HashWithIndifferentAccess.new YAML.load(workflow.definition)
rescue => e
logger.error "Error converting definition yaml to json: #{e.message}"
raise ArgumentError, "Error converting definition yaml to json: #{e.message}"
attrs['properties'] = {'template_uuid' => template_uuid}
attrs['priority'] = 1
attrs['state'] = "Uncommitted"
+ attrs['use_existing'] = false
# required
attrs['container_image'] = "arvados/jobs"