On Mon, May 28, 2012 at 05:59:54PM -0700, emc_lab wrote:
> I am a newbie, went through the ruote wiki documentation, but have a
> question. If I have the below process definition, I was expecting to
> have 2 concurrent participants that approve a given request ('ceo' and
> approver), but it looks like there is a 3rd concurrent workflow show
> under (ruote process using ruote_kit) as below. Not sure what I make
> of this 3rd concurrent workflow. Thanks for any help
Hello Emc,
welcome to the ruote mailing list.
There is no ruote wiki, I guess you're talking about the regular
documentation site ;-)
I was a bit confused when you talked about "3rd concurrent workflow", but I
think you mean "3rd concurrent branch".
I've put your process definition in a standalone script and ran it:
---8<---
require 'pp'
require 'ruote'
pdef = Ruote.process_definition :name => 'business_trip_request', :revision =>
'0.1' do
cursor do
requestor :task => 'request_business_trip_application_form'
concurrence do
participant 'ceo', :if => '${f:requested_stipend} >
${f:amount_supervised}'
participant approver :task => 'approve_business_trip_application_form'
end
rewind :if => '${forms_not_ok}'
cancel_process :if => '${trip_request_denied}'
cursor do
requestor :task => 'business_trip_report_form'
reviewer :task => 'review_business_trip_application_form'
rewind :if => '${incomplete_report}'
archiver
end
end
end
pp pdef
--->8---
And effectively, it's outputting something like:
---8<---
...
["concurrence",
{},
[["participant",
{"ceo"=>nil, "if"=>"${f:requested_stipend} > ${f:amount_supervised}"},
[]],
["approver", {"task"=>"approve_business_trip_application_form"}, []],
["participant",
{"[[\"participant\", {\"ceo\"=>nil, \"if\"=>\"${f:requested_stipend} >
${f:amount_supervised}\"}, []], [\"approver\",
{\"task\"=>\"approve_business_trip_application_form\"}, []]]"=>
nil},
[]]]],
...
--->8---
You can fix that by quoting "approver" in your process definition:
---8<---
#...
concurrence do
participant 'ceo', :if => '${f:requested_stipend} >
${f:amount_supervised}'
participant 'approver', :task => 'approve_business_trip_application_form'
end
#...
--->8---
Ruby is very permissive...
Kind 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