On 12-04-14 21:46, [email protected] wrote:
Thank you for your help Ate, it works very well, I still have a long way to go 
in understanding SCXML..

No problem, I'd be happy to help you out further if you have more questions.

If you haven't seen them yet, the slides of my presentation I gave at the ApacheCon last week might also be helpful [1], especially page 9-13.

I'll update the SCXML website sometime soon to provide a direct link to these slides as well.

Regards, Ate

[1] http://events.linuxfoundation.org/sites/events/files/slides/ApacheConUS2014%20-%20Apache%20Commons%20SCXML%202.0.pdf


Francis,


On 12-04-14 10:28, [email protected] wrote:
Hi,

I would like to know if it's possible to retrieve the rootcontext given during 
the creation of an SCXMLExecutor inside a custon action (i.e. Hello.class 
example).

Yes you can. There isn't a direct API for it but its easy to retrieve the root 
context with:

     @Override
     public void execute(ActionExecutionContext exctx) throws ModelException, 
SCXMLExpressionException {
         Context context = exctx.getGlobalContext();
         while (context.getParent() != null) {
             context = context.getParent();
         }
         // context now references the root context
       ...
     }

The above starts with the global context (the one used and reserved for the 
root/script element) and walks the parent tree up. Currently only the system 
context sits between the root and global context.

HTH, Ate


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to