Index: pom.xml
===================================================================
--- pom.xml	(revision 44431)
+++ pom.xml	(working copy)
@@ -100,7 +100,7 @@
     <json-lib.version>2.2.2</json-lib.version>
     <easymock.version>3.2</easymock.version>
     <decentxml.version>1.4</decentxml.version>
-    <commons-scxml2.version>2.0-M1</commons-scxml2.version>
+    <commons-scxml2.version>2.0-M0</commons-scxml2.version>
   </properties>
 
   <scm>
Index: workflow/src/main/java/org/onehippo/repository/documentworkflow/action/RequestActionAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/documentworkflow/action/RequestActionAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/documentworkflow/action/RequestActionAction.java	(working copy)
@@ -17,12 +17,16 @@
 package org.onehippo.repository.documentworkflow.action;
 
 import java.io.Serializable;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 import org.onehippo.repository.scxml.AbstractAction;
 import org.onehippo.repository.scxml.SCXMLWorkflowContext;
@@ -60,7 +64,8 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                             Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
 
         String identifier = (StringUtils.isBlank(getIdentifierExpr()) ? null : (String)eval(getIdentifierExpr()));
         if (StringUtils.isBlank(identifier)) {
Index: workflow/src/main/java/org/onehippo/repository/scxml/AbstractAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/AbstractAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/AbstractAction.java	(working copy)
@@ -15,15 +15,20 @@
  */
 package org.onehippo.repository.scxml;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
 import org.apache.commons.scxml2.Context;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
+import org.apache.commons.scxml2.SCInstance;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.Action;
 import org.apache.commons.scxml2.model.ModelException;
 import org.hippoecm.repository.api.WorkflowException;
@@ -38,7 +43,7 @@
 
     private static final long serialVersionUID = 1L;
 
-    private static ThreadLocal<ActionExecutionContext> tlExCtx = new ThreadLocal<>();
+    private static ThreadLocal<SCInstance> tlSCInstance = new ThreadLocal<>();
     private static ThreadLocal<Context> tlContext = new ThreadLocal<>();
 
     private Map<String, String> parameters;
@@ -46,11 +51,12 @@
     private boolean immutable = false;
 
     @Override
-    public final void execute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+    public final void execute(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Log appLog,
+            Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
         try {
-            tlExCtx.set(exctx);
+            tlSCInstance.set(scInstance);
             if (getContext() == null) {
-                tlContext.set(exctx.getContext(getParentEnterableState()));
+                tlContext.set(scInstance.getContext(getParentTransitionTarget()));
             }
             synchronized (this) {
                 if (!isImmutable()) {
@@ -66,17 +72,17 @@
                     immutable = true;
                 }
             }
-            doExecute(exctx);
+            doExecute(evtDispatcher, errRep, appLog, derivedEvents);
         } catch (WorkflowException | RepositoryException e) {
             throw new ModelException(e);
         } finally {
             tlContext.remove();
-            tlExCtx.remove();
+            tlSCInstance.remove();
         }
     }
 
     /**
-     * @return true once {@link #doExecute(ActionExecutionContext)}
+     * @return true once {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)}
      * for this instance is about to be invoked for the first time, after which no instance state should be mutable anymore
      */
     protected boolean isImmutable() {
@@ -84,7 +90,7 @@
     }
 
     /**
-     * Called before {@link #doExecute(ActionExecutionContext)} is to be invoked for the first time.
+     * Called before {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)} is to be invoked for the first time.
      * {@link Action} instance state must be immutable from that moment on,  as they may be executed concurrently from
      * different threads, and even multiple times within one thread (but only sequentially).
      */
@@ -117,7 +123,7 @@
 
     /**
      * @return the current {@link Context} of this action. Only not null when invoked within the context of
-     * {@link #doExecute(ActionExecutionContext)}
+     * {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)}
      */
     protected Context getContext() {
         return tlContext.get();
@@ -125,7 +131,7 @@
 
     /**
      * @return the {@link SCXMLWorkflowData} from the {@link Context} of this action.
-     * May only be called when invoked within the context of {@link #doExecute(ActionExecutionContext)}
+     * May only be called when invoked within the context of {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)}
      */
     protected SCXMLWorkflowData getSCXMLWorkflowData() {
         Context context = tlContext.get();
@@ -134,7 +140,7 @@
 
     /**
      * @return the {@link SCXMLWorkflowContext} from the {@link Context} of this action.
-     * May only be called when invoked within the context of {@link #doExecute(ActionExecutionContext)}
+     * May only be called when invoked within the context of {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)}
      */
     protected SCXMLWorkflowContext getSCXMLWorkflowContext() {
         Context context = tlContext.get();
@@ -142,21 +148,20 @@
     }
 
     /**
-     * Evaluates the expression by the {@link org.apache.commons.scxml2.Evaluator} using the current
-     * {@link #getContext()} and returns the evaluation result.
-     * May only be invoked within the context of {@link #doExecute(ActionExecutionContext)}
+     * Evaluates the expression by the {@link org.apache.commons.scxml2.Evaluator} using the current {@link #getContext()} and returns the evaluation result.
+     * May only be invoked within the context of {@link #doExecute(EventDispatcher, ErrorReporter, Log, Collection)}
      * @throws org.apache.commons.scxml2.model.ModelException
      * @throws org.apache.commons.scxml2.SCXMLExpressionException
      */
     @SuppressWarnings("unchecked")
     protected <T> T eval(String expr) throws ModelException, SCXMLExpressionException {
         Context ctx = tlContext.get();
-        return (T) tlExCtx.get().getEvaluator().eval(ctx, expr);
+        return (T) tlSCInstance.get().getEvaluator().eval(ctx, expr);
     }
 
     /**
      * An SCXML action implementation should implement this method to include the real execution code.
      */
-    abstract protected void doExecute(ActionExecutionContext exctx) throws ModelException,
-            SCXMLExpressionException, WorkflowException, RepositoryException;
+    abstract protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+            Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException, WorkflowException, RepositoryException;
 }
Index: workflow/src/main/java/org/onehippo/repository/scxml/AbstractWorkflowTaskAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/AbstractWorkflowTaskAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/AbstractWorkflowTaskAction.java	(working copy)
@@ -15,10 +15,15 @@
  */
 package org.onehippo.repository.scxml;
 
+import java.util.Collection;
+
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 import org.hippoecm.repository.api.WorkflowException;
 import org.onehippo.repository.api.WorkflowTask;
@@ -46,7 +51,8 @@
      * Implementation of the real task execution.
      */
     @Override
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException,
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+            Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException,
             WorkflowException, RepositoryException {
 
         T task = createWorkflowTask();
Index: workflow/src/main/java/org/onehippo/repository/scxml/ActionAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/ActionAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/ActionAction.java	(working copy)
@@ -16,9 +16,14 @@
 
 package org.onehippo.repository.scxml;
 
+import java.util.Collection;
+
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 
 /**
@@ -46,7 +51,8 @@
     }
 
     @Override
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                             Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
 
         String action = getAction();
         if (StringUtils.isBlank(action)) {
Index: workflow/src/main/java/org/onehippo/repository/scxml/FeedbackAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/FeedbackAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/FeedbackAction.java	(working copy)
@@ -17,10 +17,14 @@
 package org.onehippo.repository.scxml;
 
 import java.io.Serializable;
+import java.util.Collection;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 
 /**
@@ -49,7 +53,8 @@
     }
 
     @Override
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                             Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
 
         String key = getKey();
         if (StringUtils.isBlank(key)) {
Index: workflow/src/main/java/org/onehippo/repository/scxml/RepositorySCXMLExecutorFactory.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/RepositorySCXMLExecutorFactory.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/RepositorySCXMLExecutorFactory.java	(working copy)
@@ -17,7 +17,6 @@
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.env.SimpleDispatcher;
-import org.apache.commons.scxml2.model.ModelException;
 
 /**
  * RepositorySCXMLExecutorFactory
@@ -32,12 +31,7 @@
 
         SCXMLExecutor executor = new SCXMLExecutor(scxmlDef.getEvaluator(), new SimpleDispatcher(), new SCXMLStrictErrorReporter(scxmlDef));
         executor.setRootContext(scxmlDef.getEvaluator().newContext(null));
-        try {
-            executor.setStateMachine(scxmlDef.getSCXML());
-        }
-        catch (ModelException me) {
-            throw new SCXMLException(me);
-        }
+        executor.setStateMachine(scxmlDef.getSCXML());
         return executor;
     }
 
Index: workflow/src/main/java/org/onehippo/repository/scxml/ResultAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/ResultAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/ResultAction.java	(working copy)
@@ -16,9 +16,14 @@
 
 package org.onehippo.repository.scxml;
 
+import java.util.Collection;
+
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 
 /**
@@ -37,7 +42,8 @@
     }
 
     @Override
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                             Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
 
         String valueExpr = getValue();
         Object value = StringUtils.isBlank(valueExpr) ? null : eval(valueExpr);
Index: workflow/src/main/java/org/onehippo/repository/scxml/WorkflowExceptionAction.java
===================================================================
--- workflow/src/main/java/org/onehippo/repository/scxml/WorkflowExceptionAction.java	(revision 44431)
+++ workflow/src/main/java/org/onehippo/repository/scxml/WorkflowExceptionAction.java	(working copy)
@@ -16,9 +16,14 @@
 
 package org.onehippo.repository.scxml;
 
+import java.util.Collection;
+
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.ModelException;
 import org.hippoecm.repository.api.WorkflowException;
 
@@ -47,7 +52,8 @@
     }
 
     @Override
-    protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException, WorkflowException {
+    protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                             Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException, WorkflowException {
 
         String condExpr = getCond();
         if (!StringUtils.isBlank(condExpr) && !((Boolean)eval(condExpr))) {
Index: workflow/src/main/resources/documentworkflow.scxml
===================================================================
--- workflow/src/main/resources/documentworkflow.scxml	(revision 44431)
+++ workflow/src/main/resources/documentworkflow.scxml	(working copy)
@@ -17,7 +17,8 @@
 <scxml version="1.0"
        xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:hippo="http://www.onehippo.org/cms7/repository/scxml"
-       xmlns:cs="http://commons.apache.org/scxml">
+       xmlns:cs="http://commons.apache.org/scxml"
+       initial="handle">
 
   <script>
     def getScxmlId() { workflowContext.scxmlId }
@@ -73,7 +74,7 @@
       </transition>
     </state>
 
-    <state id="edit">
+    <state id="edit" initial="no-edit">
 
       <state id="no-edit">
         <onentry>
@@ -161,7 +162,7 @@
 
     </state>
 
-    <state id="request">
+    <state id="request" initial="no-request">
 
       <state id="no-request">
         <!-- transition to state "requested" when requests exists -->
@@ -201,7 +202,7 @@
         <transition event="acceptRequest">
 
           <!-- define temporary request variable for the event payload request parameter -->
-          <cs:var name="request" expr="_event.data?.request"/>
+          <cs:var name="request" expr="_eventdatamap.acceptRequest?.request"/>
           <!-- store the request workflow type as temporary variable -->
           <cs:var name="workflowType" expr="request.workflowType"/>
           <!-- store the request targetDate as temporary variable -->
@@ -224,18 +225,18 @@
         </transition>
 
         <transition event="rejectRequest">
-          <hippo:rejectRequest requestExpr="_event.data?.request" reasonExpr="_event.data?.reason"/>
+          <hippo:rejectRequest requestExpr="_eventdatamap.rejectRequest?.request" reasonExpr="_eventdatamap.rejectRequest?.reason"/>
         </transition>
 
         <transition event="cancelRequest">
-          <hippo:deleteRequest requestExpr="_event.data?.request"/>
+          <hippo:deleteRequest requestExpr="_eventdatamap.cancelRequest?.request"/>
         </transition>
 
       </state>
 
     </state>
 
-    <state id="publish">
+    <state id="publish" initial="no-publish">
 
       <state id="no-publish">
         <onentry>
@@ -257,29 +258,29 @@
           </if>
         </onentry>
 
-        <transition event="requestPublication" cond="!_event.data?.targetDate">
+        <transition event="requestPublication" cond="!_eventdatamap.requestPublication?.targetDate">
           <hippo:workflowRequest type="publish" contextVariantExpr="unpublished"/>
         </transition>
 
-        <transition event="requestPublication" cond="!!_event.data?.targetDate">
-          <hippo:workflowRequest type="scheduledpublish" contextVariantExpr="unpublished" targetDateExpr="_event.data?.targetDate"/>
+        <transition event="requestPublication" cond="!!_eventdatamap.requestPublication?.targetDate">
+          <hippo:workflowRequest type="scheduledpublish" contextVariantExpr="unpublished" targetDateExpr="_eventdatamap.requestPublication.targetDate"/>
         </transition>
 
-        <transition event="publish" cond="!_event.data?.targetDate">
+        <transition event="publish" cond="!_eventdatamap.publish?.targetDate">
           <hippo:copyVariant sourceState="unpublished" targetState="published"/>
           <hippo:configVariant variant="published" applyPublished="true" availabilities="live"/>
           <hippo:version variant="unpublished"/>
         </transition>
 
-        <transition event="publish" cond="!!_event.data?.targetDate">
-          <hippo:scheduleWorkflow type="publish" targetDateExpr="_event.data?.targetDate"/>
+        <transition event="publish" cond="!!_eventdatamap.publish?.targetDate">
+          <hippo:scheduleWorkflow type="publish" targetDateExpr="_eventdatamap.publish.targetDate"/>
         </transition>
 
       </state>
 
     </state>
 
-    <state id="depublish">
+    <state id="depublish" initial="no-depublish">
 
       <state id="no-depublish">
         <onentry>
@@ -301,15 +302,15 @@
           </if>
         </onentry>
 
-        <transition event="requestDepublication" cond="!_event.data?.targetDate">
+        <transition event="requestDepublication" cond="!_eventdatamap.requestDepublication?.targetDate">
           <hippo:workflowRequest type="depublish" contextVariantExpr="published"/>
         </transition>
 
-        <transition event="requestDepublication" cond="!!_event.data?.targetDate">
-          <hippo:workflowRequest type="scheduleddepublish" contextVariantExpr="published" targetDateExpr="_event.data?.targetDate"/>
+        <transition event="requestDepublication" cond="!!_eventdatamap.requestDepublication?.targetDate">
+          <hippo:workflowRequest type="scheduleddepublish" contextVariantExpr="published" targetDateExpr="_eventdatamap.requestDepublication.targetDate"/>
         </transition>
 
-        <transition event="depublish" cond="!_event.data?.targetDate">
+        <transition event="depublish" cond="!_eventdatamap.depublish?.targetDate">
           <if cond="!unpublished">
             <hippo:copyVariant sourceState="published" targetState="unpublished"/>
           </if>
@@ -318,15 +319,15 @@
           <hippo:version variant="unpublished"/>
         </transition>
 
-        <transition event="depublish" cond="!!_event.data?.targetDate">
-          <hippo:scheduleWorkflow type="depublish" targetDateExpr="_event.data?.targetDate"/>
+        <transition event="depublish" cond="!!_eventdatamap.depublish?.targetDate">
+          <hippo:scheduleWorkflow type="depublish" targetDateExpr="_eventdatamap.depublish.targetDate"/>
         </transition>
 
       </state>
 
     </state>
 
-    <state id="versioning">
+    <state id="versioning" initial="no-versioning">
 
       <state id="no-versioning">
         <!-- a document only becomes versionable once an unpublished document variant exists -->
@@ -353,22 +354,22 @@
         </transition>
 
         <transition event="retrieveVersion">
-          <hippo:retrieveVersion historic="_event.data?.date" variant="unpublished" />
+          <hippo:retrieveVersion historic="_eventdatamap.retrieveVersion?.date" variant="unpublished" />
         </transition>
 
         <transition event="versionRestoreTo">
-          <hippo:versionRestoreTo historic="_event.data?.date" variant="unpublished" target="_event.data?.target"/>
+          <hippo:versionRestoreTo historic="_eventdatamap.versionRestoreTo?.date" variant="unpublished" target="_eventdatamap.versionRestoreTo?.target"/>
         </transition>
 
         <transition event="restoreVersion">
-          <hippo:restoreVersion historic="_event.data?.date"  variant="unpublished" />
+          <hippo:restoreVersion historic="_eventdatamap.restoreVersion?.date"  variant="unpublished" />
         </transition>
 
       </state>
 
     </state>
 
-    <state id="terminate">
+    <state id="terminate" initial="no-terminate">
 
       <state id="no-terminate">
         <onentry>
@@ -403,18 +404,18 @@
         </transition>
 
         <transition event="move" target="terminated">
-          <hippo:moveDocument destinationExpr="_event.data?.destination" newNameExpr="_event.data?.name"/>
+          <hippo:moveDocument destinationExpr="_eventdatamap.move?.destination" newNameExpr="_eventdatamap.move?.name"/>
         </transition>
 
         <transition event="rename" target="terminated">
-          <hippo:renameDocument newNameExpr="_event.data?.name"/>
+          <hippo:renameDocument newNameExpr="_eventdatamap.rename?.name"/>
         </transition>
 
       </state>
 
     </state>
 
-    <state id="copy">
+    <state id="copy" initial="no-copy">
 
       <state id="no-copy">
         <transition target="copyable" cond="workflowContext.isGranted(copySource,'hippo:editor')"/>
@@ -426,7 +427,7 @@
         </onentry>
 
         <transition event="copy">
-          <hippo:copyDocument destinationExpr="_event.data?.destination" newNameExpr="_event.data?.name"/>
+          <hippo:copyDocument destinationExpr="_eventdatamap.copy?.destination" newNameExpr="_eventdatamap.copy?.name"/>
         </transition>
 
       </state>
Index: workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTest.java
===================================================================
--- workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTest.java	(revision 44431)
+++ workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTest.java	(working copy)
@@ -27,7 +27,7 @@
 import javax.jcr.RepositoryException;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.scxml2.model.EnterableState;
+import org.apache.commons.scxml2.model.TransitionTarget;
 import org.apache.jackrabbit.util.ISO8601;
 import org.hippoecm.repository.HippoStdNodeType;
 import org.hippoecm.repository.api.HippoNodeType;
@@ -138,7 +138,7 @@
     }
 
     protected Set<String> getCurrentStateIds(SCXMLWorkflowExecutor executor) {
-        Set<EnterableState> targets = executor.getSCXMLExecutor().getCurrentStatus().getStates();
+        Set<TransitionTarget> targets = executor.getSCXMLExecutor().getCurrentStatus().getStates();
 
         if (targets.isEmpty()) {
             return Collections.emptySet();
@@ -146,7 +146,7 @@
 
         Set<String> ids = new TreeSet<>();
 
-        for (EnterableState target : targets) {
+        for (TransitionTarget target : targets) {
             ids.add(target.getId());
         }
 
@@ -922,4 +922,4 @@
         assertMatchingStateIds(wf.getWorkflowExecutor(), "status", "no-edit", "no-request", "no-publish", "no-depublish", "no-versioning", "no-terminate", "no-copy");
         assertEquals(0, wf.hints().size());
     }
-}
+}
\ No newline at end of file
Index: workflow/src/test/java/org/onehippo/repository/scxml/AbstractActionTest.java
===================================================================
--- workflow/src/test/java/org/onehippo/repository/scxml/AbstractActionTest.java	(revision 44431)
+++ workflow/src/test/java/org/onehippo/repository/scxml/AbstractActionTest.java	(working copy)
@@ -20,16 +20,20 @@
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.fail;
 
+import java.util.Collection;
+import java.util.Collections;
+
 import javax.jcr.RepositoryException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.impl.SimpleLog;
-import org.apache.commons.scxml2.ActionExecutionContext;
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.ErrorReporter;
 import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.EventDispatcher;
+import org.apache.commons.scxml2.SCInstance;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.env.SimpleDispatcher;
 import org.apache.commons.scxml2.env.SimpleErrorReporter;
 import org.apache.commons.scxml2.env.groovy.GroovyContext;
@@ -49,8 +53,9 @@
 
     private EventDispatcher evtDispatcher;
     private ErrorReporter errRep;
-    private ActionExecutionContext exctx;
+    private SCInstance scInstance;
     private Log appLog;
+    private Collection<TriggerEvent> derivedEvents;
 
     private State state;
     private OnEntry onEntry;
@@ -63,20 +68,18 @@
         evtDispatcher = new SimpleDispatcher();
         errRep = new SimpleErrorReporter();
         appLog = new SimpleLog(getClass().getName());
+        derivedEvents = Collections.emptyList();
 
         state = new State();
         onEntry = new OnEntry();
-        state.addOnEntry(onEntry);
+        state.setOnEntry(onEntry);
 
         context = new GroovyContext();
         Evaluator evaluator = new GroovyEvaluator();
-        exctx = EasyMock.createNiceMock(ActionExecutionContext.class);
-        EasyMock.expect(exctx.getEventDispatcher()).andReturn(evtDispatcher).anyTimes();
-        EasyMock.expect(exctx.getErrorReporter()).andReturn(errRep).anyTimes();
-        EasyMock.expect(exctx.getAppLog()).andReturn(appLog).anyTimes();
-        EasyMock.expect(exctx.getContext(state)).andReturn(context).anyTimes();
-        EasyMock.expect(exctx.getEvaluator()).andReturn(evaluator).anyTimes();
-        EasyMock.replay(exctx);
+        scInstance = EasyMock.createNiceMock(SCInstance.class);
+        EasyMock.expect(scInstance.getContext(state)).andReturn(context).anyTimes();
+        EasyMock.expect(scInstance.getEvaluator()).andReturn(evaluator).anyTimes();
+        EasyMock.replay(scInstance);
     }
 
     @Test
@@ -84,7 +87,8 @@
         action = new AbstractAction() {
             private static final long serialVersionUID = 1L;
             @Override
-            protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException,
+            protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                    Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException,
                     WorkflowException, RepositoryException {
                 
             }
@@ -92,7 +96,7 @@
         action.setParent(onEntry);
 
         assertSame(onEntry, action.getParent());
-        assertSame(state, action.getParentEnterableState());
+        assertSame(state, action.getParentTransitionTarget());
     }
 
     @Test
@@ -108,7 +112,7 @@
         ((ParametersTestingAction) action).setOneExpression("1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10");
         assertEquals("1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10", ((ParametersTestingAction) action).getOneExpression());
 
-        action.execute(exctx);
+        action.execute(evtDispatcher, errRep, scInstance, appLog, derivedEvents);
     }
 
     private class ParametersTestingAction extends AbstractAction {
@@ -138,7 +142,8 @@
         }
 
         @Override
-        protected void doExecute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException,
+        protected void doExecute(EventDispatcher evtDispatcher, ErrorReporter errRep, Log appLog,
+                Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException,
                 WorkflowException, RepositoryException {
 
             assertSame(context, getContext());
Index: workflow/src/test/java/org/onehippo/repository/scxml/AbstractWorkflowTaskActionTest.java
===================================================================
--- workflow/src/test/java/org/onehippo/repository/scxml/AbstractWorkflowTaskActionTest.java	(revision 44431)
+++ workflow/src/test/java/org/onehippo/repository/scxml/AbstractWorkflowTaskActionTest.java	(working copy)
@@ -21,16 +21,19 @@
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
+import java.util.Collection;
+import java.util.Collections;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.impl.SimpleLog;
-import org.apache.commons.scxml2.ActionExecutionContext;
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.ErrorReporter;
 import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.EventDispatcher;
+import org.apache.commons.scxml2.SCInstance;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.env.SimpleDispatcher;
 import org.apache.commons.scxml2.env.SimpleErrorReporter;
 import org.apache.commons.scxml2.env.groovy.GroovyContext;
@@ -50,8 +53,9 @@
 
     private EventDispatcher evtDispatcher;
     private ErrorReporter errRep;
+    private SCInstance scInstance;
     private Log appLog;
-    ActionExecutionContext exctx;
+    private Collection<TriggerEvent> derivedEvents;
 
     private OnEntry onEntry;
     private Context context;
@@ -63,20 +67,18 @@
         evtDispatcher = new SimpleDispatcher();
         errRep = new SimpleErrorReporter();
         appLog = new SimpleLog(getClass().getName());
+        derivedEvents = Collections.emptyList();
 
         final State state = new State();
         onEntry = new OnEntry();
-        state.addOnEntry(onEntry);
+        state.setOnEntry(onEntry);
 
         context = new GroovyContext();
         final Evaluator evaluator = new GroovyEvaluator();
-        exctx = EasyMock.createNiceMock(ActionExecutionContext.class);
-        EasyMock.expect(exctx.getEventDispatcher()).andReturn(evtDispatcher).anyTimes();
-        EasyMock.expect(exctx.getErrorReporter()).andReturn(errRep).anyTimes();
-        EasyMock.expect(exctx.getAppLog()).andReturn(appLog).anyTimes();
-        EasyMock.expect(exctx.getContext(state)).andReturn(context).anyTimes();
-        EasyMock.expect(exctx.getEvaluator()).andReturn(evaluator).anyTimes();
-        EasyMock.replay(exctx);
+        scInstance = EasyMock.createNiceMock(SCInstance.class);
+        EasyMock.expect(scInstance.getContext(state)).andReturn(context).anyTimes();
+        EasyMock.expect(scInstance.getEvaluator()).andReturn(evaluator).anyTimes();
+        EasyMock.replay(scInstance);
     }
 
     @Test
@@ -112,7 +114,7 @@
         };
         action.setParent(onEntry);
 
-        action.execute(exctx);
+        action.execute(evtDispatcher, errRep, scInstance, appLog, derivedEvents);
         assertEquals(1, createWorkflowTaskCallCount.get());
         assertEquals(1, initTaskCallCount.get());
         assertEquals(1, processTaskResultCallCount.get());
@@ -139,7 +141,7 @@
         };
         action.setParent(onEntry);
 
-        action.execute(exctx);
+        action.execute(evtDispatcher, errRep, scInstance, appLog, derivedEvents);
 
         assertFalse(context.has("eventResult"));
         assertNull(context.get("eventResult"));
Index: workflow/src/test/java/org/onehippo/repository/scxml/RepositorySCXMLRegistryTest.java
===================================================================
--- workflow/src/test/java/org/onehippo/repository/scxml/RepositorySCXMLRegistryTest.java	(revision 44431)
+++ workflow/src/test/java/org/onehippo/repository/scxml/RepositorySCXMLRegistryTest.java	(working copy)
@@ -20,10 +20,15 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
+import java.util.Collection;
 import java.util.List;
 
-import org.apache.commons.scxml2.ActionExecutionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.scxml2.ErrorReporter;
+import org.apache.commons.scxml2.EventDispatcher;
+import org.apache.commons.scxml2.SCInstance;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.Action;
 import org.apache.commons.scxml2.model.ModelException;
 import org.junit.Before;
@@ -164,7 +169,7 @@
         assertNull(registry.getSCXMLDefinition("hello-wrong-execution-in-state"));
 
         List<LogRecord> logRecords = recordingLogger.getLogRecords();
-        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-wrong-execution-in-state'. Ignoring unknown or invalid element <log> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <state> at Line number = 3"));
+        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-wrong-execution-in-state'. Ignoring unknown or invalid element <log> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <state> at Line number = 3"));
     }
 
     /*
@@ -181,7 +186,7 @@
         assertNull(helloScxml);
 
         List<LogRecord> logRecords = recordingLogger.getLogRecords();
-        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-with-unknown-custom-actions'. Ignoring unknown or invalid element <unknown-custom-action> in namespace \"http://www.onehippo.org/cms7/repository/scxml\" as child of <onentry> at Line number = 4"));
+        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-with-unknown-custom-actions'. Ignoring unknown or invalid element <unknown-custom-action> in namespace \"http://www.onehippo.org/cms7/repository/scxml\" as child  of <onentry> at Line number = 4"));
     }
 
     /*
@@ -197,7 +202,7 @@
         assertNull(helloScxml);
 
         List<LogRecord> logRecords = recordingLogger.getLogRecords();
-        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-with-unknown-custom-actions'. Ignoring unknown or invalid element <unknown-custom-action> in namespace \"http://www.onehippo.org/cms7/repository/scxml\" as child of <onentry> at Line number = 4"));
+        assertTrue(containsLogMessage(logRecords, "Invalid SCXML model definition at '/hippo:moduleconfig/hipposcxml:definitions/hello-with-unknown-custom-actions'. Ignoring unknown or invalid element <unknown-custom-action> in namespace \"http://www.onehippo.org/cms7/repository/scxml\" as child  of <onentry> at Line number = 4"));
     }
 
     /*
@@ -219,7 +224,8 @@
     private static class KnownAction extends Action {
         private static final long serialVersionUID = 1L;
         @Override
-        public void execute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
+        public void execute(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Log appLog,
+                Collection<TriggerEvent> derivedEvents) throws ModelException, SCXMLExpressionException {
         }
     }
 }
Index: workflow/src/test/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutorTest.java
===================================================================
--- workflow/src/test/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutorTest.java	(revision 44431)
+++ workflow/src/test/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutorTest.java	(working copy)
@@ -64,7 +64,7 @@
                     "      <hippo:action action=\"terminate\" enabledExpr=\"true\"/>\n" +
                     "    </onentry>\n" +
                     "    <transition event=\"hello\">\n" +
-                    "      <hippo:result value=\"_event.data?.message\"/>\n" +
+                    "      <hippo:result value=\"_eventdatamap.hello?.message\"/>\n" +
                     "    </transition>\n" +
                     "    <transition event=\"terminate\" target=\"terminated\"/>\n" +
                     "  </state>\n" +
