On 12-04-14 10:28, ten...@free.fr 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


Thanks,
Francis.

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



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

Reply via email to