Example usage for org.apache.commons.scxml2 ActionExecutionContext getContext

List of usage examples for org.apache.commons.scxml2 ActionExecutionContext getContext

Introduction

In this page you can find the example usage for org.apache.commons.scxml2 ActionExecutionContext getContext.

Prototype

public Context getContext(EnterableState state) 

Source Link

Usage

From source file:org.onehippo.repository.scxml.AbstractAction.java

@Override
public final void execute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
    try {//  w  ww  .j  a v  a  2s  .  c o  m
        tlExCtx.set(exctx);
        if (getContext() == null) {
            tlContext.set(exctx.getContext(getParentEnterableState()));
        }
        synchronized (this) {
            if (!isImmutable()) {
                goImmutable();

                if (parameters == null) {
                    parameters = Collections.emptyMap();
                } else {
                    parameters = Collections.unmodifiableMap(parameters);
                }

                immutable = true;
            }
        }
        doExecute(exctx);
    } catch (WorkflowException | RepositoryException e) {
        throw new ModelException(e);
    } finally {
        tlContext.remove();
        tlExCtx.remove();
    }
}