[jbpm-commits] JBoss JBPM SVN: r4852 - in jbpm4/branches/jimma/modules/migration: src/main/java/org/jbpm/jpdl/internal/convert and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed May 20 03:49:38 EDT 2009


Author: jim.ma
Date: 2009-05-20 03:49:38 -0400 (Wed, 20 May 2009)
New Revision: 4852

Added:
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EndStateConverter.java
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StateConverter.java
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TaskNodeConverter.java
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TransitionConverter.java
   jbpm4/branches/jimma/modules/migration/src/test/resources/assignment.xml
   jbpm4/branches/jimma/modules/migration/src/test/resources/simple.xml
Removed:
   jbpm4/branches/jimma/modules/migration/src/test/resources/processdefinition.xml
Modified:
   jbpm4/branches/jimma/modules/migration/pom.xml
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl4Writer.java
   jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java
   jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java
Log:
Converted <TaskNode> to jpdl4

Modified: jbpm4/branches/jimma/modules/migration/pom.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/pom.xml	2009-05-19 15:48:44 UTC (rev 4851)
+++ jbpm4/branches/jimma/modules/migration/pom.xml	2009-05-20 07:49:38 UTC (rev 4852)
@@ -99,6 +99,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
+      <version>4.4</version>
       <scope>test</scope>
     </dependency>
 

Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl4Writer.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl4Writer.java	2009-05-19 15:48:44 UTC (rev 4851)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl4Writer.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -26,8 +26,6 @@
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
-import javax.xml.bind.PropertyException;
-
 import org.jbpm.jpdl4.model.ObjectFactory;
 import org.jbpm.jpdl4.model.Process;
 public class Jpdl4Writer {

Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java	2009-05-19 15:48:44 UTC (rev 4851)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -22,33 +22,24 @@
 package org.jbpm.jpdl.internal.convert;
 
 import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.jbpm.graph.def.Action;
-import org.jbpm.graph.def.Event;
 import org.jbpm.graph.def.Node;
 import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.def.Transition;
 import org.jbpm.graph.node.EndState;
 import org.jbpm.graph.node.StartState;
 import org.jbpm.graph.node.State;
-import org.jbpm.jpdl4.model.JavaType;
-import org.jbpm.jpdl4.model.ObjectFactory;
+import org.jbpm.graph.node.TaskNode;
+import org.jbpm.jpdl.internal.convert.util.EndStateConverter;
+import org.jbpm.jpdl.internal.convert.util.StartStateConverter;
+import org.jbpm.jpdl.internal.convert.util.StateConverter;
+import org.jbpm.jpdl.internal.convert.util.TaskNodeConverter;
 import org.jbpm.jpdl4.model.Process;
-import org.jbpm.jpdl4.model.TransitionType;
 import org.xml.sax.InputSource;
 
 public class JpdlConverter {
 	private ConverterContext context;
-	private ObjectFactory objectFactory = new ObjectFactory();
-
 	public JpdlConverter(ConverterContext ctx) {
 		context = ctx;
 	}
@@ -62,7 +53,6 @@
 			// TODO:handle the exception
 		}
 		return mapProcessDef(processDef);
-
 	}
 
 	public Process mapProcessDef(ProcessDefinition def) {
@@ -73,91 +63,32 @@
 			// map start state node
 			if (node.getNodeType().equals(Node.NodeType.StartState)) {
 				StartState jpdl3start = (StartState) node;
-				Process.Start start = mapStartState(jpdl3start);
+				Process.Start start = StartStateConverter.run(jpdl3start);
 				process.getSwimlaneAndOnAndTimer().add(start);
-			}
-
-			if (node.getNodeType().equals(Node.NodeType.State)) {
+			} else if (node.getNodeType().equals(Node.NodeType.State)) {
 				State jpdl3state = (State) node;
-				Process.State state = mapState(jpdl3state);
+				Process.State state = StateConverter.run(jpdl3state);
 				process.getSwimlaneAndOnAndTimer().add(state);
-			}
-
-			if (node.getNodeType().equals(Node.NodeType.EndState)) {
+			} else if (node.getNodeType().equals(Node.NodeType.EndState)) {
 				EndState jpdl3end = (EndState) node;
-				Process.End end = mapEndState(jpdl3end);
+				Process.End end = EndStateConverter.run(jpdl3end);
 				process.getSwimlaneAndOnAndTimer().add(end);
+			} else if (node.getNodeType().equals(Node.NodeType.Task)) {
+				//TaskNode
+				if (node instanceof TaskNode) {
+					TaskNode taskNode = (TaskNode)node;
+					Set<Process.Task> tasks = TaskNodeConverter.run(taskNode);
+					process.getSwimlaneAndOnAndTimer().addAll(tasks);
+				}				
 			}
 
 		}
-
 		return process;
 	}
 
-	public Process.Start mapStartState(StartState jpdl3start) {
-		Process.Start start = new Process.Start();
-		start.setName(jpdl3start.getName());
-		Iterator iterator = jpdl3start.getLeavingTransitionsMap().entrySet()
-				.iterator();
-		while (iterator.hasNext()) {
-			Map.Entry entry = (Map.Entry) iterator.next();
-			Transition trans = (Transition) entry.getValue();
-			start.getTransition().add(mapTranisition(trans, false));
-		}
-		return start;
-	}
+	
 
-	public TransitionType mapTranisition(Transition transition, boolean state) {
-		TransitionType transType = null;
-		if (state) {
-			transType = new Process.State.Transition();
-		} else {
-			transType = new TransitionType();
-		}
-		transType.setName(transition.getName());
-		// get the actions
-		Iterator ite = transition.getEvents().entrySet().iterator();
-		while (ite.hasNext()) {
-			Map.Entry<Object, Event> entry = (Map.Entry<Object, Event>) ite.next();
-			if (entry.getValue().getEventType().equals(Event.EVENTTYPE_TRANSITION)) {
-				if (entry.getValue().getActions() != null) {
-					for (Action action : (List<Action>) entry.getValue().getActions()) {
-						JavaType javaType = new JavaType();
-						javaType.setClazz(action.getActionDelegation()
-								.getClassName());
-						//TODO:Check this java method
-						javaType.setMethod("execute");
-						transType.getEventListenerGroup().add(
-								objectFactory.createOnJava(javaType));
-					}
-
-				}
-			}
-		}
-		transType.setTo(transition.getTo().getName());
-
-		return transType;
-	}
-
-	public Process.State mapState(State jpdl3state) {
-		Process.State state = new Process.State();
-		state.setName(jpdl3state.getName());
-		Iterator iterator = jpdl3state.getLeavingTransitionsMap().entrySet().iterator();
-		while (iterator.hasNext()) {
-		    Map.Entry entry = (Map.Entry)iterator.next();
-		    Transition trans = (Transition)entry.getValue();
-		    state.getTransition().add((Process.State.Transition)mapTranisition(trans, true));
-		}		
-		
-		return state;
-		
-	}
 	
-	
-	public Process.End mapEndState(EndState endState) {
-		Process.End end = new Process.End();
-		end.setName(endState.getName());
-		return end;
-	}
 
+
 }

Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EndStateConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EndStateConverter.java	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EndStateConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,33 @@
+/*
+ * 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.convert.util;
+
+import org.jbpm.graph.node.EndState;
+import org.jbpm.jpdl4.model.Process;
+
+public class EndStateConverter {	
+	public static Process.End run(EndState endState) {
+		Process.End end = new Process.End();
+		end.setName(endState.getName());
+		return end;
+	}
+}

Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,45 @@
+/*
+ * 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.convert.util;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.node.StartState;
+import org.jbpm.jpdl4.model.Process;
+import org.jbpm.jpdl4.model.TransitionType;
+
+public class StartStateConverter {
+	public static Process.Start run(StartState jpdl3start) {
+		Process.Start start = new Process.Start();
+		start.setName(jpdl3start.getName());
+		Iterator iterator = jpdl3start.getLeavingTransitionsMap().entrySet()
+				.iterator();
+		while (iterator.hasNext()) {
+			Map.Entry entry = (Map.Entry) iterator.next();
+			Transition trans = (Transition) entry.getValue();
+			start.getTransition().add(TransitionConverter.run(trans, TransitionType.class));
+		}
+		return start;
+	}
+}

Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StateConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StateConverter.java	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StateConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,47 @@
+/*
+ * 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.convert.util;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.node.State;
+import org.jbpm.jpdl4.model.Process;
+
+public class StateConverter {
+
+	public static Process.State run(State jpdl3state) {
+		Process.State state = new Process.State();
+		state.setName(jpdl3state.getName());
+		Iterator iterator = jpdl3state.getLeavingTransitionsMap().entrySet().iterator();
+		while (iterator.hasNext()) {
+		    Map.Entry entry = (Map.Entry)iterator.next();
+		    Transition trans = (Transition)entry.getValue();
+		    state.getTransition().add((Process.State.Transition)TransitionConverter.run(trans, Process.State.Transition.class));
+		}		
+		
+		return state;
+		
+	}
+
+}

Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TaskNodeConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TaskNodeConverter.java	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TaskNodeConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,58 @@
+package org.jbpm.jpdl.internal.convert.util;
+
+import java.util.Set;
+
+import org.jbpm.graph.node.TaskNode;
+import org.jbpm.instantiation.Delegation;
+import org.jbpm.jpdl4.model.Process;
+import org.jbpm.jpdl4.model.WireObjectType;
+import org.jbpm.taskmgmt.def.Task;
+import org.jbpm.graph.def.Transition;
+
+public class TaskNodeConverter {
+	public static Set<Process.Task> run(TaskNode taskNode) {
+		String taskNodeName = taskNode.getName();
+		Set<Process.Task> result = new java.util.HashSet<Process.Task>();
+		Set<Task> tasks = taskNode.getTasks();
+		Task[] taskArray = tasks.toArray(new org.jbpm.taskmgmt.def.Task[0]);
+
+		if (taskArray != null && taskArray.length > 0) {
+			for (int i = 0 ; i < taskArray.length; i++) {
+				Task tmpTask =taskArray[i];
+				Process.Task tmpNewTask = convert(tmpTask);
+				if (i ==0 ) {
+					tmpNewTask.setName(taskNodeName);
+				}
+				if (i+1 < taskArray.length) {
+					Process.Task.Transition transition = new Process.Task.Transition();
+					transition.setTo(taskArray[i+1].getName());
+					tmpNewTask.getTransition().add(transition);
+				} else {
+					//The last task node 
+					for (Transition trans : taskNode.getLeavingTransitions()) {
+						tmpNewTask.getTransition().add(TransitionConverter.run(trans, Process.Task.Transition.class));
+					}
+					
+				}
+				result.add(tmpNewTask);
+				
+			}
+		}
+
+		return result;
+	}
+
+	private static Process.Task convert(Task task) {
+		Process.Task newTask = new Process.Task();
+		Delegation delegation = task.getAssignmentDelegation();
+		if (delegation != null) {
+			WireObjectType object = new WireObjectType();
+			object.setClazz(delegation.getClassName());
+			newTask.setAssignmentHandler(object);
+		}
+		newTask.setName(task.getName());
+		return newTask;
+
+	}
+
+}

Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TransitionConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TransitionConverter.java	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/TransitionConverter.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,71 @@
+/*
+ * 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.convert.util;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.jbpm.graph.def.Action;
+import org.jbpm.graph.def.Event;
+import org.jbpm.graph.def.Transition;
+import org.jbpm.jpdl4.model.JavaType;
+import org.jbpm.jpdl4.model.ObjectFactory;
+import org.jbpm.jpdl4.model.TransitionType;
+
+public class TransitionConverter {
+	public static ObjectFactory objectFactory = new ObjectFactory();
+	public static <T extends TransitionType> T run(Transition transition, Class<T> claz) {
+		TransitionType transType = null;
+		try {
+			transType = claz.newInstance();
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} 
+		// get the actions
+		if (transition.getEvents() != null) {
+			Iterator ite = transition.getEvents().entrySet().iterator();
+			while (ite.hasNext()) {
+				Map.Entry<Object, Event> entry = (Map.Entry<Object, Event>) ite.next();
+				if (entry.getValue().getEventType().equals(
+						Event.EVENTTYPE_TRANSITION)) {
+					if (entry.getValue().getActions() != null) {
+						for (Action action : (List<Action>) entry.getValue()
+								.getActions()) {
+							JavaType javaType = new JavaType();
+							javaType.setClazz(action.getActionDelegation()
+									.getClassName());
+							// TODO:Check this java method
+							javaType.setMethod("execute");
+							transType.getEventListenerGroup().add(
+									objectFactory.createOnJava(javaType));
+						}
+
+					}
+				}
+			}
+		}
+		transType.setTo(transition.getTo().getName());
+		return (T)transType;
+	}
+}

Modified: jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java	2009-05-19 15:48:44 UTC (rev 4851)
+++ jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java	2009-05-20 07:49:38 UTC (rev 4852)
@@ -26,11 +26,25 @@
 
 import org.jbpm.api.Problem;
 import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class JpdlConverterTest extends junit.framework.TestCase {
-	public void testSimpleProcessFile() throws Exception {
+public class JpdlConverterTest {
+	
+	@Test
+	public void runSimpleProcessFile() throws Exception {
+		testConvert("simple.xml");
+	}
+	
+	@Test
+	public void runAssignmentProcessFile() throws Exception {
+		testConvert("assignment.xml");
+	}
+	
+	
+	public void testConvert(String resourcefile) throws Exception {
+		URL url = getClass().getClassLoader().getResource(resourcefile);
 		ConverterContext context = new ConverterContext();
-		URL url = getClass().getClassLoader().getResource("processdefinition.xml");
 		context.put(ConverterContext.PROCESS_FILE_URL, url);
 		//Convert to process file to jpdl4
 		JpdlConverter converter = new JpdlConverter(context);
@@ -38,12 +52,12 @@
 		Jpdl4Writer writer = new Jpdl4Writer();
 		java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
 		writer.write(process, bout, false);
-		
+			
 		//Validate it with Jpdl4Parser
 		String jpdl4xml = new String(bout.toByteArray());
-		List<Problem> problems = new JpdlParser().createParse().setString(
-				jpdl4xml).execute().getProblems();
-		assertEquals(problems.toString(), 0, problems.size());
+		List<Problem> problems = new JpdlParser().createParse().setString(jpdl4xml).execute().getProblems();
+		Assert.assertEquals(problems.toString(), 0, problems.size());
 	}
+	
 
 }

Added: jbpm4/branches/jimma/modules/migration/src/test/resources/assignment.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/resources/assignment.xml	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/test/resources/assignment.xml	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+  xmlns="urn:jbpm.org:jpdl-3.2"  name="RulesAssignment">
+   <start-state name="start">
+      <transition name="" to="Approve Order Node"></transition>
+   </start-state>
+   <end-state name="end1"></end-state>
+   <task-node name="Approve Order Node">
+      <task name="ApproveOrder1">
+         <assignment class="org.jbpm.examples.assignment.RulesAssignmentHandler" >
+           		<group>reviewers</group>
+   				<objectNames>
+					<element>order</element>
+				</objectNames>
+	       		<ruleFile>/assignment/Assignment.drl</ruleFile>
+			</assignment>
+      </task>
+      
+      <task name="ApproveOrder2">
+         <assignment class="org.jbpm.examples.assignment.RulesAssignmentHandler" >
+           		<group>reviewers</group>
+   				<objectNames>
+					<element>order</element>
+				</objectNames>
+	       		<ruleFile>/assignment/Assignment.drl</ruleFile>
+			</assignment>
+      </task>
+      
+      <transition name="" to="end1"></transition>
+   </task-node>
+</process-definition>

Deleted: jbpm4/branches/jimma/modules/migration/src/test/resources/processdefinition.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/resources/processdefinition.xml	2009-05-19 15:48:44 UTC (rev 4851)
+++ jbpm4/branches/jimma/modules/migration/src/test/resources/processdefinition.xml	2009-05-20 07:49:38 UTC (rev 4852)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition 
-  xmlns="urn:jbpm.org:jpdl-3.2"
-  name="simple">
-   <start-state name="start">
-      <transition name="to_state" to="first">
-         <action name="action" class="com.sample.action.MessageActionHandler">
-            <message>Going to the first state!</message>
-         </action>
-      </transition>
-   </start-state>
-   <state name="first">
-      <transition name="to_end" to="end">
-         <action name="action" class="com.sample.action.MessageActionHandler">
-            <message>About to finish!</message>
-         </action>
-      </transition>
-   </state>
-   <end-state name="end"></end-state>
-</process-definition>
\ No newline at end of file

Added: jbpm4/branches/jimma/modules/migration/src/test/resources/simple.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/resources/simple.xml	                        (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/test/resources/simple.xml	2009-05-20 07:49:38 UTC (rev 4852)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition 
+  xmlns="urn:jbpm.org:jpdl-3.2"
+  name="simple">
+   <start-state name="start">
+      <transition name="to_state" to="first">
+         <action name="action" class="com.sample.action.MessageActionHandler">
+            <message>Going to the first state!</message>
+         </action>
+      </transition>
+   </start-state>
+   <state name="first">
+      <transition name="to_end" to="end">
+         <action name="action" class="com.sample.action.MessageActionHandler">
+            <message>About to finish!</message>
+         </action>
+      </transition>
+   </state>
+   <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file




More information about the jbpm-commits mailing list