[jbpm-commits] JBoss JBPM SVN: r4830 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/api/activity and 7 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun May 17 05:55:44 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-05-17 05:55:43 -0400 (Sun, 17 May 2009)
New Revision: 4830

Added:
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupActivity.java
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupBinding.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupBasicsTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupTimersTest.java
Removed:
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateActivity.java
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateBinding.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/SuperStateBasicsTest.java
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
   jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
   jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
Log:
JBPM-2026 renamed super-state to group and added a group timer test, fixing a lot of scope related things

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -113,7 +113,7 @@
   String STATE_INACTIVE_CONCURRENT_ROOT = "inactive-concurrent-root";
   
   /** parent of a scoped execution.  This execution is inactive, 
-   * but points to the parent scope like e.g. a super-state.
+   * but points to the parent scope like e.g. a group.
    * This execution has exactly 1 child execution.  That indicates 
    * the state inside of the scope.
    * Make sure that comparisons are 

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -94,7 +94,7 @@
    * <p>CAUTION: It's up to the client to make sure 
    * that this transition makes sense as there is no check whether the given transition 
    * is an outgoing transition of the current activity.  The motivation for that is 
-   * that in case of superstates, that check can become too 'expensive'. </p> */
+   * that in case of groups, that check can become too 'expensive'. </p> */
   void take(Transition transition);
 
   /** let's the given execution take the transition.

Modified: jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd	2009-05-17 09:55:43 UTC (rev 4830)
@@ -421,9 +421,9 @@
         </complexType>
       </element>
 
-      <!-- ~~~ SUPER-STATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+      <!-- ~~~ group ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <!-- 
-      <element name="super-state">
+      <element name="group">
         <annotation><documentation>Scope enclosing a number of activities.
         </documentation></annotation>
         <complexType>

Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -27,6 +27,8 @@
 import org.jbpm.api.model.Activity;
 import org.jbpm.api.model.OpenExecution;
 import org.jbpm.api.model.Transition;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
 
 
 /**
@@ -40,18 +42,32 @@
   protected String state = null;
 
   public void execute(ActivityExecution execution) {
+    execute((ExecutionImpl)execution);
+  }
+  
+  public void execute(ExecutionImpl execution) {
     Activity activity = execution.getActivity();
     List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
+    ActivityImpl parentActivity = (ActivityImpl) activity.getParentActivity();
 
-    Activity parentActivity = activity.getParentActivity();
     if ( (parentActivity!=null)
-         && ("super-state".equals(parentActivity.getType()))
-         && (outgoingTransitions!=null)
-         && (outgoingTransitions.size()==1)
+         && ("group".equals(parentActivity.getType())) 
        ) {
-      Transition outgoingTransition = outgoingTransitions.get(0);
-      execution.take(outgoingTransition);
+      // if the end activity itself has an outgoing transition 
+      // (such end activities should be drawn on the border of the group)
+      if ( (outgoingTransitions!=null)
+              && (outgoingTransitions.size()==1)
+          ) {
+         Transition outgoingTransition = outgoingTransitions.get(0);
+         // taking the transition that goes over the group boundaries will 
+         // destroy the scope automatically (see atomic operation TakeTransition)
+         execution.take(outgoingTransition);
 
+      } else {
+        execution.setActivity(parentActivity);
+        execution.signal();
+      }
+        
     } else {
       OpenExecution executionToEnd = null;
       if (endProcessInstance) {

Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupActivity.java (from rev 4829, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateActivity.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupActivity.java	                        (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupActivity.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jpdl.internal.activity;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.JbpmException;
+import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.model.Activity;
+import org.jbpm.api.model.Transition;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class GroupActivity extends JpdlExternalActivity {
+
+  private static final long serialVersionUID = 1L;
+
+  public void execute(ActivityExecution execution) throws Exception {
+    execute((ExecutionImpl)execution);
+  }
+  public void execute(ExecutionImpl execution) throws Exception {
+    // find the start activity
+    Activity activity = execution.getActivity();
+    List<Activity> startActivities = findStartActivities(activity);
+    if (startActivities.size()==1) {
+      execution.execute(startActivities.get(0));
+    } else {
+      
+      ExecutionImpl concurrentRoot = null;
+      if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
+        concurrentRoot = execution;
+      } else if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
+        concurrentRoot = execution.getParent();
+        
+      } else {
+        throw new JbpmException("illegal state");
+      }
+      
+      for (Activity startActivity: startActivities) {
+        ExecutionImpl concurrentExecution = concurrentRoot.createExecution();
+        concurrentExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
+        concurrentExecution.execute(startActivity);
+      }
+    }
+  }
+
+  private List<Activity> findStartActivities(Activity activity) {
+    List<Activity> startActivities = new ArrayList<Activity>();
+    List nestedActivities = activity.getActivities();
+    for (ActivityImpl nestedActivity : (List<ActivityImpl>) nestedActivities) {
+      if ( (nestedActivity.getIncomingTransitions()==null)
+           || (nestedActivity.getIncomingTransitions().isEmpty())
+         ) {
+        startActivities.add(nestedActivity);
+      }
+    }
+    return startActivities;
+  }
+
+  public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) throws Exception {
+    Transition transition = null;
+    Activity activity = execution.getActivity();
+    List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
+    
+    int nbrOfOutgoingTransitions  = (outgoingTransitions!=null ? outgoingTransitions.size() : 0);
+    if ( (signalName==null)
+         && (nbrOfOutgoingTransitions==1)
+       ) {
+      transition = outgoingTransitions.get(0);
+    } else {
+      transition = activity.getOutgoingTransition(signalName);
+    }
+    
+    execution.take(transition);
+  }
+}


Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupActivity.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupBinding.java (from rev 4829, jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateBinding.java)
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupBinding.java	                        (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupBinding.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jpdl.internal.activity;
+
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class GroupBinding extends JpdlBinding {
+
+  public GroupBinding() {
+    super("group");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    GroupActivity groupActivity = new GroupActivity();
+    
+    ActivityImpl activity = parse.findObject(ActivityImpl.class);
+
+    JpdlParser jpdlParser = (JpdlParser) parser;
+    jpdlParser.parseActivities(element, parse, activity);
+
+    return groupActivity;
+  }
+}


Property changes on: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/GroupBinding.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateActivity.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateActivity.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jpdl.internal.activity;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.activity.ActivityExecution;
-import org.jbpm.api.model.Activity;
-import org.jbpm.api.model.Transition;
-import org.jbpm.pvm.internal.model.ActivityImpl;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class SuperStateActivity extends JpdlExternalActivity {
-
-  private static final long serialVersionUID = 1L;
-
-  public void execute(ActivityExecution execution) throws Exception {
-    execute((ExecutionImpl)execution);
-  }
-  public void execute(ExecutionImpl execution) throws Exception {
-    // find the start activity
-    Activity activity = execution.getActivity();
-    List<Activity> startActivities = findStartActivities(activity);
-    if (startActivities.size()==1) {
-      execution.execute(startActivities.get(0));
-    } else {
-      
-      ExecutionImpl concurrentRoot = null;
-      if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
-        concurrentRoot = execution;
-      } else if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
-        concurrentRoot = execution.getParent();
-        
-      } else {
-        throw new JbpmException("illegal state");
-      }
-      
-      for (Activity startActivity: startActivities) {
-        ExecutionImpl concurrentExecution = concurrentRoot.createExecution();
-        concurrentExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
-        concurrentExecution.execute(startActivity);
-      }
-    }
-  }
-
-  private List<Activity> findStartActivities(Activity activity) {
-    List<Activity> startActivities = new ArrayList<Activity>();
-    List nestedActivities = activity.getActivities();
-    for (ActivityImpl nestedActivity : (List<ActivityImpl>) nestedActivities) {
-      if ( (nestedActivity.getIncomingTransitions()==null)
-           || (nestedActivity.getIncomingTransitions().isEmpty())
-         ) {
-        startActivities.add(nestedActivity);
-      }
-    }
-    return startActivities;
-  }
-
-  public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) throws Exception {
-    Transition transition = null;
-    Activity activity = execution.getActivity();
-    List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
-    
-    int nbrOfOutgoingTransitions  = (outgoingTransitions!=null ? outgoingTransitions.size() : 0);
-    if ( (signalName==null)
-         && (nbrOfOutgoingTransitions==1)
-       ) {
-      transition = outgoingTransitions.get(0);
-    } else {
-      transition = activity.getOutgoingTransition(signalName);
-    }
-    
-    execution.take(transition);
-  }
-}

Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateBinding.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SuperStateBinding.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jpdl.internal.activity;
-
-import org.jbpm.jpdl.internal.xml.JpdlParser;
-import org.jbpm.pvm.internal.model.ActivityImpl;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Tom Baeyens
- */
-public class SuperStateBinding extends JpdlBinding {
-
-  public SuperStateBinding() {
-    super("super-state");
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    SuperStateActivity superStateActivity = new SuperStateActivity();
-    
-    ActivityImpl activity = parse.findObject(ActivityImpl.class);
-
-    JpdlParser jpdlParser = (JpdlParser) parser;
-    jpdlParser.parseActivities(element, parse, activity);
-
-    return superStateActivity;
-  }
-}

Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.activities.xml	2009-05-17 09:55:43 UTC (rev 4830)
@@ -15,5 +15,5 @@
   <activity binding="org.jbpm.jpdl.internal.activity.TaskBinding" />
   <activity binding="org.jbpm.jpdl.internal.activity.SubProcessBinding" />
   <activity binding="org.jbpm.jpdl.internal.activity.MailBinding" />
-  <activity binding="org.jbpm.jpdl.internal.activity.SuperStateBinding" />
+  <activity binding="org.jbpm.jpdl.internal.activity.GroupBinding" />
 </activities>

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -321,7 +321,9 @@
     
     // end all child executions
     if (executions!=null) {
-      for (ExecutionImpl child: executions) {
+      // making a copy of the executions to prevent ConcurrentMoidificationException
+      List<ExecutionImpl> executionsToEnd = new ArrayList<ExecutionImpl>(executions);
+      for (ExecutionImpl child: executionsToEnd) {
         child.end(state);
       }
     }
@@ -336,6 +338,7 @@
     } else { // this is a process instance
       fireHistoryEvent(new ProcessInstanceEnd());
       fire(Event.END, getProcessDefinition());
+
       if (superProcessExecution!=null) {
         log.trace(toString()+" signals super process execution");
         superProcessExecution.signal();
@@ -379,6 +382,7 @@
 
   public void signal(String signal, Map<String, Object> parameters) {
     checkActive();
+    propagation = Propagation.EXPLICIT;
     if (getActivity()!=null) {
       performAtomicOperation(new Signal(signal, parameters, getActivity()));
     } else if (transition!=null) {

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -56,7 +56,7 @@
     if (execution.getName()!=null) {
       log.debug(execution.toString()+" signals "+activity);
     } else {
-      log.debug("signalling "+activity+", signal="+signalName);
+      log.debug("signalling "+activity+", signalName="+signalName);
     }
 
     ExternalActivityBehaviour externalActivityBehaviour = (ExternalActivityBehaviour) activity.getBehaviour();

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TakeTransition.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -36,37 +36,36 @@
 public class TakeTransition implements AtomicOperation {
 
   private static Log log = Log.getLog(TakeTransition.class.getName());
-  
+
   public boolean isAsync(ExecutionImpl execution) {
-    return execution.getActivity().isLeaveAsync()
-           || execution.getTransition().isTakeAsync();
+    return execution.getActivity().isLeaveAsync() || execution.getTransition().isTakeAsync();
   }
 
   public void perform(ExecutionImpl execution) {
     TransitionImpl transition = execution.getTransition();
 
-    if (execution.getName()!=null) {
-      log.debug(execution.toString()+" takes "+transition);
+    if (execution.getName() != null) {
+      log.debug(execution.toString() + " takes " + transition);
     } else {
-      log.debug("taking "+transition);
+      log.debug("taking " + transition);
     }
-    
+
     List<ActivityImpl> leftActivities = getActivitiesLeft(execution.getActivity(), transition.getDestination());
     ExecutionImpl propagatingExecution = execution;
     for (ActivityImpl leftActivity : leftActivities) {
       propagatingExecution = propagatingExecution.endActivity(leftActivity);
     }
-    
+
     propagatingExecution.setActivity(null);
     propagatingExecution.fire(Event.TAKE, transition);
-    
+
     boolean wait = false;
-    
+
     Condition waitCondition = transition.getWaitCondition();
-    if (waitCondition!=null) {
+    if (waitCondition != null) {
       wait = waitCondition.evaluate(propagatingExecution);
     }
-    
+
     if (!wait) {
       propagatingExecution.performAtomicOperation(ExecutionImpl.PROCEED_TO_DESTINATION);
     }
@@ -74,23 +73,21 @@
 
   List<ActivityImpl> getActivitiesLeft(ActivityImpl source, ActivityImpl destination) {
     List<ActivityImpl> activitiesLeft = new ArrayList<ActivityImpl>();
-    
+
     if (source.equals(destination)) {
       activitiesLeft.add(source);
     } else {
       List<ObservableElementImpl> destinationChain = destination.getParentChain();
-      
+
       if (!destinationChain.contains(source)) {
         ActivityImpl sourceActivity = source;
-        while ( (sourceActivity!=null)
-                && (!destinationChain.contains(sourceActivity))
-              ) {
+        while ((sourceActivity != null) && (!destinationChain.contains(sourceActivity))) {
           activitiesLeft.add(sourceActivity);
-          sourceActivity = sourceActivity.getParentActivity(); 
+          sourceActivity = sourceActivity.getParentActivity();
         }
       }
     }
-    
+
     return activitiesLeft;
   }
 
@@ -98,7 +95,7 @@
     return "take-transition";
   }
 
-  public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {
+  public MessageImpl< ? > createAsyncMessage(ExecutionImpl execution) {
     return new TakeTransitionMessage(execution);
   }
 }
\ No newline at end of file

Copied: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupBasicsTest.java (from rev 4829, jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/SuperStateBasicsTest.java)
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupBasicsTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupBasicsTest.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -0,0 +1,249 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.activities;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class GroupBasicsTest extends JbpmTestCase {
+
+  public void testSimplestGroup() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <end name='done' />" +
+      "    <transition to='end' />" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+
+  public void testGroupWithoutStartActivity() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <state name='a'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <end name='done' />" +
+      "    <transition to='end' />" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+
+  public void testGroupMultipleEntryStartActivities() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='choose' />" +
+      "  </start>" +
+      "  <decision name='choose' expr='#{theWayToGo}'>" +
+      "    <transition name='left' to='left' />" +
+      "    <transition name='right' to='right' />" +
+      "  </decision>" +
+      "  <group name='group'>" +
+      "    <start name='left'>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <start name='right'>" +
+      "      <transition to='b' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <state name='b'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <end name='done' />" +
+      "    <transition to='end' />" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("theWayToGo", "left");
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group", variables);
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+
+    variables.put("theWayToGo", "right");
+    processInstance = executionService.startProcessInstanceByKey("Group", variables);
+    assertEquals("b", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+
+  public void testGroupDirectEntryTransition() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='direct' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start name='direct'>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <end name='done' />" +
+      "    <transition to='end' />" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+
+  public void testGroupWithoutEndActivity() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a' />" +
+      "    <transition to='end' />" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+
+  public void testGroupMultipleExitEndActivities() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition name='a' to='exitA' />" +
+      "      <transition name='b' to='exitB' />" +
+      "    </state>" +
+      "    <end name='exitA'>" +
+      "      <transition to='endA' />" +
+      "    </end>" +
+      "    <end name='exitB'>" +
+      "      <transition to='endB' />" +
+      "    </end>" +
+      "  </group>" +
+      "  <end name='endA' />" +
+      "  <end name='endB' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId(), "a");
+    assertTrue(processInstance.isEnded());
+    assertEquals("endA", processInstance.getActivityName());
+    
+    processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId(), "b");
+    assertTrue(processInstance.isEnded());
+    assertEquals("endB", processInstance.getActivityName());
+  }
+
+  public void testGroupDirectExitTransition() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition to='end' />" +
+      "    </state>" +
+      "  </group>" +
+      "  <end name='end' />" +
+      "</process>"
+    );
+
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    assertEquals("a", processInstance.getActivityName());
+    
+    processInstance = executionService.signalExecutionById(processInstance.getId());
+    assertTrue(processInstance.isEnded());
+  }
+}


Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupBasicsTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupTimersTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupTimersTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupTimersTest.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.activities;
+
+import java.util.List;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.job.Job;
+import org.jbpm.api.job.Timer;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class GroupTimersTest extends JbpmTestCase {
+
+  public void testGroupWithTimer() {
+    deployJpdlXmlString(
+      "<process name='Group'>" +
+      "  <start>" +
+      "    <transition to='group' />" +
+      "  </start>" +
+      "  <group name='group'>" +
+      "    <start>" +
+      "      <transition to='a' />" +
+      "    </start>" +
+      "    <state name='a'>" +
+      "      <transition to='done' />" +
+      "    </state>" +
+      "    <end name='done' />" +
+      "    <transition to='end' />" +
+      "    <transition name='timeout' to='escalate'>" +
+      "      <timer duedate='2 hours' />" +
+      "    </transition>" +
+      "  </group>" +
+      "  <state name='end' />" +
+      "  <state name='escalate' />" +
+      "</process>"
+    );
+    
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Group");
+    
+    assertEquals(Execution.STATE_INACTIVE_SCOPE, processInstance.getState());
+    assertEquals("group", processInstance.getActivityName());
+    assertEquals(1, processInstance.getExecutions().size());
+    Execution groupExecution = processInstance.getExecutions().iterator().next();
+    assertEquals(Execution.STATE_ACTIVE_ROOT, groupExecution.getState());
+    assertEquals("a", groupExecution.getActivityName());
+
+    processInstance = executionService.signalExecutionById(groupExecution.getId());
+
+    assertEquals(Execution.STATE_ACTIVE_ROOT, processInstance.getState());
+    assertEquals("end", processInstance.getActivityName());
+    assertEquals(0, processInstance.getExecutions().size());
+
+    
+    processInstance = executionService.startProcessInstanceByKey("Group");
+
+    List<Job> jobs = managementService
+      .createJobQuery()
+      .processInstanceId(processInstance.getId())
+      .list();
+    
+    assertEquals(1, jobs.size());
+    
+    Timer timer = (Timer) jobs.get(0);
+    assertEquals("timeout", timer.getSignalName());
+    
+    managementService.executeJob(timer.getDbid());
+    
+    processInstance = executionService.findProcessInstanceById(processInstance.getId());
+    
+    assertEquals(Execution.STATE_ACTIVE_ROOT, processInstance.getState());
+    assertEquals("escalate", processInstance.getActivityName());
+    assertEquals(0, processInstance.getExecutions().size());
+  }
+
+}


Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/GroupTimersTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/SuperStateBasicsTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/SuperStateBasicsTest.java	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/SuperStateBasicsTest.java	2009-05-17 09:55:43 UTC (rev 4830)
@@ -1,249 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.activities;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jbpm.api.ProcessInstance;
-import org.jbpm.test.JbpmTestCase;
-
-
-/**
- * @author Tom Baeyens
- */
-public class SuperStateBasicsTest extends JbpmTestCase {
-
-  public void testSimplestSuperState() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='super' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <start>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <state name='a'>" +
-      "      <transition to='done' />" +
-      "    </state>" +
-      "    <end name='done' />" +
-      "    <transition to='end' />" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-
-  public void testSuperStateWithoutStartActivity() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='super' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <state name='a'>" +
-      "      <transition to='done' />" +
-      "    </state>" +
-      "    <end name='done' />" +
-      "    <transition to='end' />" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-
-  public void testSuperStateMultipleEntryStartActivities() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='choose' />" +
-      "  </start>" +
-      "  <decision name='choose' expr='#{theWayToGo}'>" +
-      "    <transition name='left' to='left' />" +
-      "    <transition name='right' to='right' />" +
-      "  </decision>" +
-      "  <super-state name='super'>" +
-      "    <start name='left'>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <start name='right'>" +
-      "      <transition to='b' />" +
-      "    </start>" +
-      "    <state name='a'>" +
-      "      <transition to='done' />" +
-      "    </state>" +
-      "    <state name='b'>" +
-      "      <transition to='done' />" +
-      "    </state>" +
-      "    <end name='done' />" +
-      "    <transition to='end' />" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    Map<String, Object> variables = new HashMap<String, Object>();
-    variables.put("theWayToGo", "left");
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super", variables);
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-
-    variables.put("theWayToGo", "right");
-    processInstance = executionService.startProcessInstanceByKey("Super", variables);
-    assertEquals("b", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-
-  public void testSuperStateDirectEntryTransition() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='direct' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <start name='direct'>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <state name='a'>" +
-      "      <transition to='done' />" +
-      "    </state>" +
-      "    <end name='done' />" +
-      "    <transition to='end' />" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-
-  public void testSuperStateWithoutEndActivity() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='super' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <start>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <state name='a' />" +
-      "    <transition to='end' />" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-
-  public void testSuperStateMultipleExitEndActivities() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='super' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <start>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <state name='a'>" +
-      "      <transition name='a' to='exitA' />" +
-      "      <transition name='b' to='exitB' />" +
-      "    </state>" +
-      "    <end name='exitA'>" +
-      "      <transition to='endA' />" +
-      "    </end>" +
-      "    <end name='exitB'>" +
-      "      <transition to='endB' />" +
-      "    </end>" +
-      "  </super-state>" +
-      "  <end name='endA' />" +
-      "  <end name='endB' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId(), "a");
-    assertTrue(processInstance.isEnded());
-    assertEquals("endA", processInstance.getActivityName());
-    
-    processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId(), "b");
-    assertTrue(processInstance.isEnded());
-    assertEquals("endB", processInstance.getActivityName());
-  }
-
-  public void testSuperStateDirectExitTransition() {
-    deployJpdlXmlString(
-      "<process name='Super'>" +
-      "  <start>" +
-      "    <transition to='super' />" +
-      "  </start>" +
-      "  <super-state name='super'>" +
-      "    <start>" +
-      "      <transition to='a' />" +
-      "    </start>" +
-      "    <state name='a'>" +
-      "      <transition to='end' />" +
-      "    </state>" +
-      "  </super-state>" +
-      "  <end name='end' />" +
-      "</process>"
-    );
-
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("Super");
-    assertEquals("a", processInstance.getActivityName());
-    
-    processInstance = executionService.signalExecutionById(processInstance.getId());
-    assertTrue(processInstance.isEnded());
-  }
-}

Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml	2009-05-16 15:38:55 UTC (rev 4829)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml	2009-05-17 09:55:43 UTC (rev 4830)
@@ -2189,13 +2189,13 @@
     <para>A timer can be specified in the <literal>transition</literal>
     element in wait state activities such as <literal>state</literal>s, 
     <literal>task</literal>s, <literal>sub-process</literal>es and 
-    <literal>super-state</literal>s.  
+    <literal>group</literal>s.  
     When such a timer fires, that transition is taken.
     </para>
     <para>A timer can also be specified in custom events in wait state 
     activities such as <literal>state</literal>s, 
     <literal>task</literal>s, <literal>sub-process</literal>es and 
-    <literal>super-state</literal>s.  The <literal>timer</literal> element 
+    <literal>group</literal>s.  The <literal>timer</literal> element 
     should then be the first element in the <literal>on</literal> element representing 
     the event. In that case the event fires upon the duedate of the timer.   
     </para>




More information about the jbpm-commits mailing list