commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabrizio Morbini <fmorb...@gmail.com>
Subject [scxml] double evaluation of expr in assignments
Date Thu, 12 Aug 2010 18:51:54 GMT
Hi,

problem: i would like to assign to a variable, v1, the value of
another variable, v2, but the name "v2" is the result of an
expression. For example, assume you have an inspect event that should
assign to a predetermined variable the value of the variable whose
name is passed as payload to the inspect event.

attempted solution: add a new parameter to the scxml assign action.
The new parameter is a boolean that if true allows to evaluate the
result of the first evaluation of the expr field of the assign action.
In the example above, if the expr is
"_eventdatamap.get('inspect').get('varName')" the first evaluation
will return "v2" the second evaluation will return the value of "v2"
in the datamodel.

question: this seems a common situation and i wonder if there is
already a solution.

thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message