On Tue, Aug 18, 2015 at 6:27 AM, Sinisa Zec <sinisa....@adcon.hr> wrote:
> Dears,
>
>
>
> We are using Apache SCXML2 for the project which is based on FSM logic. I am
> trying for some time to achieve the following:
>
>
>
> 1.Set some variables in (Groovy)context from Java – X set of variables
>
> 2.Read those values in from the <script> in Groovy (it might be any other
> but we have chosen Groovy - other suggestions are welcomed).
>
> 3.Set the NEW set of variables (in GroovyContext) from Groovy script – Y set
> of variables (in principle it is simple mapping)
>
> 4.Read the new values (Y set) from context in Java.
>
>
>
> I didn't find another way for the scenario above, but to initialize Y set of
> variables to empty values already in Java, before step 3. from above.
>
> Do you possible have a different suggestion?
>
>
>
> Do you think it would be better to try this with Jexl (I did try, but
> totally failed to do anything with Context from Jexl script)?
>
>
>
> Are you possible aware of any useful examples of context manipulation from
> <script> (Groovy or any other)?

I have a simple example in my github, Please have a look if you want:
- https://github.com/woonsan/commons-scxml-examples/tree/master/stopwatch

I tried to simplify the StopWatch example found in commons-scxml unit
test. You will be able to see how to pass StopWatch java object
through context and how to access the object in JEXL script in scxml.

HTH,

Woonsan

>
>
>
> Thank you very much in advance!
>
>
>
>
>
> mit freundlichen Grüßen / with best regards / Lijepi pozdrav
> Sinisa Zec
>
>
> ___________________________________________________________
>
> Adcon d.o.o.
>
> Josipa Jurja Strossmayera 341
>
> 31000 Osijek
>
> Hrvatska – Croatia
>
> fix: +385 31 638 136
>
> mobile: +385 91 509 0903
>
>  <http://www.adcon.hr/> www.adcon.hr
>
>
>
> Sinisa Zec       <mailto:%3csinisa....@adcon.hr%3e> <sinisa....@adcon.hr>
>
> development
>
> ___________________________________________________________
>
>
>

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

Reply via email to