List of usage examples for org.apache.commons.scxml.model ModelException ModelException
public ModelException(final String message, final Throwable cause)
From source file:com.headstrong.fusion.statemachine.action.SCXMLCustomAction.java
public void execute(final EventDispatcher evtDispatcher, final ErrorReporter errRep, final SCInstance scInstance, final Log appLog, final Collection derivedEvents) throws ModelException, SCXMLExpressionException { if (logger.isDebugEnabled()) { logger.debug("SCXML Custom action invoked with properties." + properties); }/* w ww .jav a2 s . c o m*/ com.headstrong.fusion.statemachine.action.Action action = null; try { action = (com.headstrong.fusion.statemachine.action.Action) ServiceAliasManager.getInstance() .getServiceByAlias(name, 0); } catch (ServiceUnavailableException e) { logger.error("Service " + name + " not available.", e); throw new ModelException("Action service not available.", e); } try { action.execute(properties); } catch (StateMachineException e) { logger.error("Error while invoking the action " + name, e); throw new ModelException("Error while invoking the action " + name, e); } }