On Thu, Apr 19, 2012 at 03:10:23PM -0700, Klaus Schmidtmamn wrote:
>
> i experimented a little with ruote and found the following miss-
> understanding:
> When i ask for a budget value within one "cursor" into one
> "concurrence", so i can't access to this variable within an other
> curson in the same concurrence.
>
> sequence do
> concurrence do
> cursor do # c1
> participant 'askForBudget'
> echo 'budget: ${f:budget}'
> participant 'sayMyBudget'
> end
> cursor do # c2
> participant 'sayMyBudget'
> rewind :unless => '3 < 1'
> end
> end
> end
>
> engine.register_participant :sayMyBudget do |workitem|
> puts "globale Budget-Variable: #{workitem.fields['budget']}"
> end
>
> "sayMyBudget" only works into curso #c1. why?
Hello Klaus,
welcome to the ruote mailing list.
Process variables are not the same thing as workitem fields [1]
You cursor 1 and your cursor 2 work on a different copy of the original
workitem. When the concurrence ends, the workitems get merged [2].
There are various ways to do the thing you seem to be doing, the most obvious
one is:
---8<---
sequence do
participant 'askForBudget'
participant 'sayMyBudget'
end
--->8---
I.e. keep the "budget" as a workitem field and never call "sayMyBudget"
before "askForBudget".
Best regards,
--
John Mettraux - http://lambda.io/processi
[1] http://ruote.rubyforge.org/vars_and_fields.html
[2] http://ruote.rubyforge.org/exp/concurrence.html
--
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