[jbpm-commits] JBoss JBPM SVN: r6471 - in jbpm4/trunk/modules: test-db/src/test/java/org/jbpm/bpmn/test and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jul 7 13:22:03 EDT 2010


Author: swiderski.maciej
Date: 2010-07-07 13:22:03 -0400 (Wed, 07 Jul 2010)
New Revision: 6471

Added:
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/bpmn/test/task/
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/bpmn/test/task/ManualTaskTest.java
   jbpm4/trunk/modules/test-db/src/test/resources/org/jbpm/bpmn/manualTask.bpmn.xml
Modified:
   jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ManualTaskActivity.java
Log:
JBPM-2909: fixed ManualTaskActivity to move on on execute method

Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ManualTaskActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ManualTaskActivity.java	2010-07-07 08:37:01 UTC (rev 6470)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ManualTaskActivity.java	2010-07-07 17:22:03 UTC (rev 6471)
@@ -13,5 +13,6 @@
     private static final long serialVersionUID = 1L;
 
     public void execute(ExecutionImpl executionImpl) {
+      proceed(executionImpl, findOutgoingSequenceFlow(executionImpl, CONDITIONS_CHECKED));
     }
 }

Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/bpmn/test/task/ManualTaskTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/bpmn/test/task/ManualTaskTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/bpmn/test/task/ManualTaskTest.java	2010-07-07 17:22:03 UTC (rev 6471)
@@ -0,0 +1,46 @@
+package org.jbpm.bpmn.test.task;
+
+import java.util.List;
+
+import org.jbpm.api.NewDeployment;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+public class ManualTaskTest  extends JbpmTestCase {
+
+  @Override
+  protected void setUp() throws Exception {
+      super.setUp();
+      NewDeployment deployment = repositoryService.createDeployment();
+      deployment.addResourceFromClasspath("org/jbpm/bpmn/manualTask.bpmn.xml");
+      registerDeployment(deployment.deploy());
+      
+      identityService.createGroup("sales");
+      identityService.createUser("johndoe", "John", "Doe");
+      identityService.createMembership("johndoe", "sales");
+  }
+  
+  @Override
+  protected void tearDown() throws Exception {
+    identityService.deleteGroup("sales");
+    identityService.deleteUser("johndoe");
+    
+    super.tearDown();
+  }
+
+  public void testJavaServiceTaskCall() {
+
+      ProcessInstance pi = executionService.startProcessInstanceByKey("manualTaskProcess");
+
+      assertNotNull(pi.getId());
+
+      List<Task> allTasks = taskService.findGroupTasks("johndoe");
+      assertEquals(1, allTasks.size());
+
+      taskService.completeTask(allTasks.get(0).getId());
+      assertProcessInstanceEnded(pi);
+  }
+
+}

Added: jbpm4/trunk/modules/test-db/src/test/resources/org/jbpm/bpmn/manualTask.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/org/jbpm/bpmn/manualTask.bpmn.xml	                        (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/resources/org/jbpm/bpmn/manualTask.bpmn.xml	2010-07-07 17:22:03 UTC (rev 6471)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions id="sid-e471f2be-74cc-4f20-a201-09327449efdf"
+	typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
+	targetNamespace="http://www.omg.org/bpmn20" xmlns="http://schema.omg.org/spec/BPMN/2.0"
+	xmlns:jbpm="http://jbpm.org/bpmn2">
+    <process id="manualTaskProcess" name="manualTaskProcess">
+        <laneSet id="laneSet">
+            <lane name="DefaultLane" id="lane">
+                <flowElementRef>start</flowElementRef>
+                <flowElementRef>manualTask</flowElementRef>
+                <flowElementRef>userTask</flowElementRef>
+                <flowElementRef>end</flowElementRef>
+            </lane>
+        </laneSet>
+        <startEvent name="Process start" id="start"/>
+	    <manualTask name="Do it manually" id="manualTask"/>
+		<userTask implementation="other" name="Sales operation" id="userTask">
+			<potentialOwner resourceRef="sales" jbpm:type="group">
+				<resourceAssignmentExpression>
+					<formalExpression>sales</formalExpression>
+				</resourceAssignmentExpression>
+			</potentialOwner>
+		</userTask>        
+        <endEvent name="Process end" id="end"/>
+        <sequenceFlow targetRef="manualTask" sourceRef="start" name="flow2Manual" id="flow1"/>
+        <sequenceFlow targetRef="userTask" sourceRef="manualTask" name="flow2user" id="flow2"/>
+    	<sequenceFlow targetRef="end" sourceRef="userTask" name="flow2End" id="flow3"/>
+    </process>
+</definitions>



More information about the jbpm-commits mailing list