[jboss-svn-commits] JBL Code SVN: r24500 - in labs/jbossrules/branches/mfossati/drools-osworkflow/src: main/java/org/drools/osworkflow/core/command and 6 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Dec 29 10:31:46 EST 2008
Author: mfossati
Date: 2008-12-29 10:31:46 -0500 (Mon, 29 Dec 2008)
New Revision: 24500
Added:
labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/
labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/DoActionCommand.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/ComplexProcessTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/DroolsOSWorkFlowTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple2ProcessTest.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple3ProcessTest.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleDroolsFlowTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleProcessTest.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/AbstractJPAPersistenceTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/OSWorkFlowPersistenceTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/resources/simple2rf.rf
Removed:
labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/DoActionCommand.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/ComplexProcessTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/DroolsOSWorkFlowTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/OSWorkFlowPersistenceTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple2ProcessTest.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple3ProcessTest.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleDroolsFlowTestCase.java
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleProcessTest.java
Modified:
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/suite/SimpleTestSuite.java
Log:
More complex persistence testCases
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/DoActionCommand.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/DoActionCommand.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/DoActionCommand.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,56 +0,0 @@
-package org.drools.osworkflow.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.drools.WorkingMemory;
-import org.drools.osworkflow.instance.OSWorkflowProcessInstance;
-import org.drools.process.command.Command;
-import org.drools.process.instance.ProcessInstance;
-
-/*Author: salaboy */
-
-public class DoActionCommand implements Command {
-
- private int actionId;
- private long processInstanceId;
- private Map<String, Object> results = new HashMap<String, Object>();
-
- public void setActionId(int actionId) {
- this.actionId = actionId;
- }
-
- public int getActionId() {
- return actionId;
- }
-
- public Map<String, Object> getResults() {
- return results;
- }
-
- public void setResults(Map<String, Object> results) {
- this.results = results;
- }
-
- public void setProcessInstanceId(long processInstanceId) {
- this.processInstanceId = processInstanceId;
- }
-
- public long getProcessInstanceId() {
- return processInstanceId;
- }
-
- public Object execute(WorkingMemory workingMemory) {
- ProcessInstance processInstance = ( ProcessInstance ) workingMemory.getProcessInstance(getProcessInstanceId());
- if (processInstance != null) {
- ((OSWorkflowProcessInstance)processInstance).doAction(actionId, new HashMap());
-
- }
- return null;
- }
-
-
-
-
-
-}
\ No newline at end of file
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/DoActionCommand.java (from rev 24498, labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/DoActionCommand.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/DoActionCommand.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/DoActionCommand.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,56 @@
+package org.drools.osworkflow.core.command;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.drools.WorkingMemory;
+import org.drools.osworkflow.instance.OSWorkflowProcessInstance;
+import org.drools.process.command.Command;
+import org.drools.process.instance.ProcessInstance;
+
+/*Author: salaboy */
+
+public class DoActionCommand implements Command {
+
+ private int actionId;
+ private long processInstanceId;
+ private Map<String, Object> results = new HashMap<String, Object>();
+
+ public void setActionId(int actionId) {
+ this.actionId = actionId;
+ }
+
+ public int getActionId() {
+ return actionId;
+ }
+
+ public Map<String, Object> getResults() {
+ return results;
+ }
+
+ public void setResults(Map<String, Object> results) {
+ this.results = results;
+ }
+
+ public void setProcessInstanceId(long processInstanceId) {
+ this.processInstanceId = processInstanceId;
+ }
+
+ public long getProcessInstanceId() {
+ return processInstanceId;
+ }
+
+ public Object execute(WorkingMemory workingMemory) {
+ ProcessInstance processInstance = ( ProcessInstance ) workingMemory.getProcessInstance(getProcessInstanceId());
+ if (processInstance != null) {
+ ((OSWorkflowProcessInstance)processInstance).doAction(actionId, new HashMap());
+
+ }
+ return null;
+ }
+
+
+
+
+
+}
\ No newline at end of file
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/main/java/org/drools/osworkflow/core/command/DoActionCommand.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/ComplexProcessTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/ComplexProcessTestCase.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/ComplexProcessTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,70 +0,0 @@
-package org.drools;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import junit.framework.TestCase;
-
-import org.drools.osworkflow.DroolsWorkflow;
-import org.drools.osworkflow.composite.CompositeWorkflow;
-
-import com.opensymphony.workflow.InvalidActionException;
-import com.opensymphony.workflow.InvalidEntryStateException;
-import com.opensymphony.workflow.InvalidInputException;
-import com.opensymphony.workflow.InvalidRoleException;
-import com.opensymphony.workflow.Workflow;
-import com.opensymphony.workflow.WorkflowException;
-import com.opensymphony.workflow.config.DefaultConfiguration;
-import com.opensymphony.workflow.spi.Step;
-
-public class ComplexProcessTestCase extends TestCase {
-
- public void testComplexProcess() {
- Workflow workflow = new CompositeWorkflow();
- DefaultConfiguration config = new DefaultConfiguration();
- workflow.setConfiguration(config);
- try {
- long id = workflow.initialize("entrevista", 1, null);
- Collection<Step> currentSteps = workflow.getCurrentSteps(id);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 1
- Step currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- int[] availableActions = workflow.getAvailableActions(id, Collections.EMPTY_MAP);
- //verify we only have 6 available actions
- assertEquals("Unexpected number of available actions", 6, availableActions.length);
- workflow.doAction(id, 2, null);
- currentSteps = workflow.getCurrentSteps(id);
- //verify we have two current step
- assertEquals("Unexpected number of current steps", 2, currentSteps.size());
- //verify it's step 1
- currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- availableActions = workflow.getAvailableActions(id, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 3
- assertEquals("Unexpected available action", 3, availableActions[0]);
-
- } catch (InvalidActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InvalidRoleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InvalidInputException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InvalidEntryStateException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (WorkflowException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
-}
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/DroolsOSWorkFlowTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/DroolsOSWorkFlowTestCase.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/DroolsOSWorkFlowTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,132 +0,0 @@
-package org.drools;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.drools.osworkflow.DroolsWorkflow;
-
-import com.opensymphony.workflow.InvalidInputException;
-import com.opensymphony.workflow.Workflow;
-import com.opensymphony.workflow.WorkflowException;
-import com.opensymphony.workflow.config.DefaultConfiguration;
-import com.opensymphony.workflow.spi.Step;
-import com.opensymphony.workflow.spi.WorkflowEntry;
-
-public class DroolsOSWorkFlowTestCase extends TestCase {
-
- private String resource;
-
-
- private DroolsOSWorkFlowTestCase(String xmlname) {
- super("testPrimer");
- this.resource = xmlname;
- }
-
- public static TestSuite suite() {
- InnerTestSuite suite = new InnerTestSuite();
- addResources(suite);
- return suite;
- }
-
-
- public static void addResources(InnerTestSuite suite) {
- suite.addTestFor("simple");
- }
-
-
- /**
- * Testcase.
- */
- public void testPrimer() {
- Workflow workflow = new DroolsWorkflow();
- DefaultConfiguration config = new DefaultConfiguration();
- workflow.setConfiguration(config);
- try {
- long workflowId = workflow.initialize(this.resource, 1, null);
-
- Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertNumberOfCurrentSteps(1, currentSteps.size());
- //verify it's step 1
- Step currentStep = currentSteps.iterator().next();
- assertCurrentStep(1,currentStep);
- int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 2
- assertEquals("Unexpected available action", 2, availableActions[0]);
-
- workflow.doAction(workflowId, 2, null);
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 1
- currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 3
- assertEquals("Unexpected available action", 3, availableActions[0]);
-
- workflow.doAction(workflowId, 3, null);
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have no more current steps
- assertEquals("Unexpected number of current steps", 0, currentSteps.size());
- //verify process completed
- assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have no available action
- assertEquals("Unexpected number of available actions", 0, availableActions.length);
- }
- catch (InvalidInputException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- catch (WorkflowException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- }
-
- private void assertCurrentStep (int stepIteration , long expectedStepId) {
- assertEquals("Unexpected current step", stepIteration, expectedStepId);
- }
-
- public void assertCurrentStep (int stepIteration , Step currentStep) {
- assertCurrentStep (stepIteration, currentStep.getId());
- }
-
- public void assertAvaliableActions (int stepIdIteration, int expectedAvaliableActions) {
- assertEquals("Unexpected number of available actions", 1, expectedAvaliableActions);
- }
-
- public void assertWFState (Workflow workflow, int stepId , int expectedStateId) {
-// int wId = workflow.getHistorySteps(id)
-// assertEquals("Unexpected state", expectedStateId, workflow.getEntryState(id))
- }
-
- public void assertNumberOfCurrentSteps(int stepIteration , int expectedSteps) {
- assertEquals("Unexpected number of current steps", stepIteration, expectedSteps);
- }
-
- /**
- * @author ar26818347
- */
- private static class InnerTestSuite extends TestSuite {
-
- public DroolsOSWorkFlowTestCase addTestFor(String xmlname) {
- DroolsOSWorkFlowTestCase test = new DroolsOSWorkFlowTestCase(xmlname);
- this.addTest(test);
- return test;
- }
-
-
- }
-}
-
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/OSWorkFlowPersistenceTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/OSWorkFlowPersistenceTestCase.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/OSWorkFlowPersistenceTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,101 +0,0 @@
-package org.drools;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.Properties;
-
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import junit.framework.TestCase;
-
-import org.drools.compiler.PackageBuilder;
-import org.drools.marshalling.ProcessMarshallerRegistry;
-import org.drools.osworkflow.core.DoActionCommand;
-import org.drools.osworkflow.instance.OSWorkflowProcessInstance;
-import org.drools.osworkflow.persistence.marshaller.OSWorkflowMarshaller;
-import org.drools.persistence.session.SingleSessionCommandService;
-import org.drools.process.command.GetProcessInstanceCommand;
-import org.drools.process.command.StartProcessCommand;
-import org.drools.rule.Package;
-import org.drools.runtime.process.ProcessInstance;
-
-public class OSWorkFlowPersistenceTestCase extends TestCase {
-
- private EntityManagerFactory emf;
-
- protected void setUp() {
- emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
- }
-
- protected void tearDown() {
- emf.close();
- }
-
- public void testSave() {
- setup();
- Properties properties = new Properties();
- properties.put("processInstanceManagerFactory",
- "org.drools.persistence.processinstance.JPAProcessInstanceManagerFactory");
- properties.put("workItemManagerFactory", "org.drools.persistence.processinstance.JPAWorkItemManagerFactory");
- properties.put("processSignalManagerFactory", "org.drools.persistence.processinstance.JPASignalManagerFactory");
- RuleBaseConfiguration conf = new RuleBaseConfiguration(properties);
-
- // load the process
- RuleBase ruleBase = createKnowledgeBase(conf);
-
- SingleSessionCommandService service = new SingleSessionCommandService(ruleBase);
- StartProcessCommand startProcessCommand = new StartProcessCommand();
- startProcessCommand.setProcessId("simple");
- ProcessInstance processInstance = (ProcessInstance) service.execute(startProcessCommand);
- System.out.println("Started process instance " + processInstance.getId());
-
- service = new SingleSessionCommandService(ruleBase);
- GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
- getProcessInstanceCommand.setProcessInstanceId(processInstance.getId());
- processInstance = (ProcessInstance) service.execute(getProcessInstanceCommand);
- assertNotNull(processInstance);
-
-
-
- service = new SingleSessionCommandService(ruleBase);
- DoActionCommand doActionCmd = new DoActionCommand();
- doActionCmd.setProcessInstanceId(processInstance.getId());
- doActionCmd.setActionId(3); //Accion que quiero ejecutar sobre el step en el que estoy
- service.execute(doActionCmd);
-
-// CompleteWorkItemCommand completeWorkItemCommand = new CompleteWorkItemCommand();
-// completeWorkItemCommand.setWorkItemId(workItem.getId());
-// service.execute(completeWorkItemCommand);
-
- }
-
- /**
- * Process definition.
- */
- private static RuleBase createKnowledgeBase(RuleBaseConfiguration conf) {
- try {
- // create a builder
- PackageBuilder builder = new PackageBuilder();
- // load the process
- Reader source = new InputStreamReader(OSWorkFlowPersistenceTestCase.class
- .getResourceAsStream("/simplerf.rf"));
- builder.addProcessFromXml(source);
- // create the knowledge base
- Package pkg = builder.getPackage();
- RuleBase ruleBase = RuleBaseFactory.newRuleBase(conf);
- ruleBase.addPackage(pkg);
- return ruleBase;
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- fail(e.getMessage());
- return null;
- }
- }
-
- private void setup() {
- ProcessMarshallerRegistry.INSTANCE.register(OSWorkflowProcessInstance.class, OSWorkflowMarshaller.INSTANCE);
- }
-
-}
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple2ProcessTest.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple2ProcessTest.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple2ProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,127 +0,0 @@
-package org.drools;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.drools.osworkflow.DroolsWorkflow;
-import org.drools.osworkflow.OSWorkflowParser;
-import org.drools.osworkflow.composite.CompositeWorkflow;
-import org.drools.osworkflow.core.OSWorkflowProcess;
-import org.drools.osworkflow.xml.OSWorkflowSemanticModule;
-import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
-import org.drools.xml.SemanticModules;
-import org.drools.xml.XmlProcessReader;
-
-import com.opensymphony.workflow.InvalidInputException;
-import com.opensymphony.workflow.Workflow;
-import com.opensymphony.workflow.WorkflowException;
-import com.opensymphony.workflow.config.DefaultConfiguration;
-import com.opensymphony.workflow.loader.WorkflowDescriptor;
-import com.opensymphony.workflow.spi.Step;
-import com.opensymphony.workflow.spi.WorkflowEntry;
-
-public class Simple2ProcessTest extends TestCase {
-
- public void testSimpleProcess() {
- Workflow workflow = new DroolsWorkflow();
- DefaultConfiguration config = new DefaultConfiguration();
- workflow.setConfiguration(config);
- try {
- long workflowId = workflow.initialize("simple2", 1, null);
-
- Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 1
- Step currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 2
- assertEquals("Unexpected available action", 2, availableActions[0]);
-
- workflow.doAction(workflowId, 2, null);
-
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we have two current steps
- assertEquals("Unexpected number of current steps", 2, currentSteps.size());
- //verify it's step 2 and 3
- List<Integer> currentStepIds = new ArrayList<Integer>();
- for (Step step: currentSteps) {
- currentStepIds.add((int) step.getId());
- }
- assertTrue("Current step 2 not found", currentStepIds.contains(2));
- assertTrue("Current step 3 not found", currentStepIds.contains(3));
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we have two available actions
- assertEquals("Unexpected number of available actions", 2, availableActions.length);
- //verify it's action 3 and 4
- List<Integer> availableActionIds = new ArrayList<Integer>();
- for (int availableAction: availableActions) {
- availableActionIds.add(availableAction);
- }
- assertTrue("Available action 3 not found", availableActionIds.contains(3));
- assertTrue("Available action 4 not found", availableActionIds.contains(4));
-
- workflow.doAction(workflowId, 3, null);
-
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 3
- currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 3, currentStep.getStepId());
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 4
- assertEquals("Unexpected available action", 4, availableActions[0]);
-
- workflow.doAction(workflowId, 4, null);
-
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have no more current steps
- assertEquals("Unexpected number of current steps", 0, currentSteps.size());
- //verify process completed
- assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have no available action
- assertEquals("Unexpected number of available actions", 0, availableActions.length);
-
- } catch (InvalidInputException e) {
- e.printStackTrace();
- fail(e.getMessage());
- } catch (WorkflowException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- }
-
- public void testToXML() throws Exception {
- DefaultConfiguration config = new DefaultConfiguration();
- config.load(null);
- WorkflowDescriptor workflowDescriptor = config.getWorkflow("simple2");
- OSWorkflowProcess process = new OSWorkflowParser().parseOSWorkflow(workflowDescriptor);
-
- String processXML = XmlOSWorkflowProcessDumper.INSTANCE.dump(process);
- System.out.println(processXML);
-
- SemanticModules semanticModules = new SemanticModules();
- semanticModules.addSemanticModule(new OSWorkflowSemanticModule());
- XmlProcessReader reader = new XmlProcessReader(semanticModules);
- System.setProperty( "drools.schema.validating", "false" );
- OSWorkflowProcess process2 = (OSWorkflowProcess) reader.read(new StringReader(processXML));
- assertNotNull(process2);
- }
-
-}
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple3ProcessTest.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple3ProcessTest.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple3ProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,55 +0,0 @@
-package org.drools;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.drools.osworkflow.DroolsWorkflow;
-import org.drools.osworkflow.OSWorkflowParser;
-import org.drools.osworkflow.core.OSWorkflowProcess;
-import org.drools.osworkflow.xml.OSWorkflowSemanticModule;
-import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
-import org.drools.xml.SemanticModules;
-import org.drools.xml.XmlProcessReader;
-
-import com.opensymphony.workflow.InvalidInputException;
-import com.opensymphony.workflow.Workflow;
-import com.opensymphony.workflow.WorkflowException;
-import com.opensymphony.workflow.config.DefaultConfiguration;
-import com.opensymphony.workflow.loader.WorkflowDescriptor;
-import com.opensymphony.workflow.spi.Step;
-import com.opensymphony.workflow.spi.WorkflowEntry;
-
-public class Simple3ProcessTest extends TestCase {
-
- public void testSimpleProcess() {
- Workflow workflow = new DroolsWorkflow();
- DefaultConfiguration config = new DefaultConfiguration();
- workflow.setConfiguration(config);
- try {
- long workflowId = workflow.initialize("holiday2", 100, null);
- Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
- //verify it's step 1
- Step currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 1
- assertEquals("Unexpected available action", 1, availableActions[0]);
-
-
- }
- catch (Exception e) {
- int a = 1;
- }
-
- }
-
-
-}
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleDroolsFlowTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleDroolsFlowTestCase.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleDroolsFlowTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,40 +0,0 @@
-package org.drools;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import junit.framework.TestCase;
-
-import org.drools.compiler.PackageBuilder;
-import org.drools.rule.Package;
-
-public class SimpleDroolsFlowTestCase extends TestCase {
-
- public void testSimple() {
- try {
- // load the process
- RuleBase ruleBase = createKnowledgeBase();
- // create a new session
- StatefulSession session = ruleBase.newStatefulSession();
- // start a new process instance
- session.startProcess("simple");
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-
- private RuleBase createKnowledgeBase() throws Exception {
- // create a builder
- PackageBuilder builder = new PackageBuilder();
- // load the process
- Reader source = new InputStreamReader(SimpleDroolsFlowTestCase.class
- .getResourceAsStream("/simple.rf"));
- builder.addProcessFromXml(source);
- // create the knowledge base
- Package pkg = builder.getPackage();
- RuleBase ruleBase = RuleBaseFactory.newRuleBase();
- ruleBase.addPackage(pkg);
- return ruleBase;
- }
-
-}
Deleted: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleProcessTest.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleProcessTest.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -1,96 +0,0 @@
-package org.drools;
-
-import java.io.StringReader;
-import java.util.Collection;
-import java.util.Collections;
-
-import junit.framework.TestCase;
-
-import org.drools.compiler.PackageBuilderConfiguration;
-import org.drools.osworkflow.DroolsWorkflow;
-import org.drools.osworkflow.OSWorkflowParser;
-import org.drools.osworkflow.composite.CompositeWorkflow;
-import org.drools.osworkflow.core.OSWorkflowProcess;
-import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
-import org.drools.xml.XmlProcessReader;
-
-import com.opensymphony.workflow.InvalidInputException;
-import com.opensymphony.workflow.Workflow;
-import com.opensymphony.workflow.WorkflowException;
-import com.opensymphony.workflow.config.DefaultConfiguration;
-import com.opensymphony.workflow.loader.WorkflowDescriptor;
-import com.opensymphony.workflow.spi.Step;
-import com.opensymphony.workflow.spi.WorkflowEntry;
-
-public class SimpleProcessTest extends TestCase {
-
- public void testSimpleProcess() {
- Workflow workflow = new DroolsWorkflow();
- DefaultConfiguration config = new DefaultConfiguration();
- workflow.setConfiguration(config);
- try {
- long workflowId = workflow.initialize("simple", 1, null);
-
- Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 1
- Step currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 2
- assertEquals("Unexpected available action", 2, availableActions[0]);
-
- workflow.doAction(workflowId, 2, null);
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have one current step
- assertEquals("Unexpected number of current steps", 1, currentSteps.size());
- //verify it's step 1
- currentStep = currentSteps.iterator().next();
- assertEquals("Unexpected current step", 1, currentStep.getStepId());
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have one available action
- assertEquals("Unexpected number of available actions", 1, availableActions.length);
- //verify it's action 3
- assertEquals("Unexpected available action", 3, availableActions[0]);
-
- workflow.doAction(workflowId, 3, null);
- currentSteps = workflow.getCurrentSteps(workflowId);
- //verify we only have no more current steps
- assertEquals("Unexpected number of current steps", 0, currentSteps.size());
- //verify process completed
- assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
-
- availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
- //verify we only have no available action
- assertEquals("Unexpected number of available actions", 0, availableActions.length);
- } catch (InvalidInputException e) {
- e.printStackTrace();
- fail(e.getMessage());
- } catch (WorkflowException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- }
-
- public void testToXML() throws Exception {
- DefaultConfiguration config = new DefaultConfiguration();
- config.load(null);
- WorkflowDescriptor workflowDescriptor = config.getWorkflow("simple");
- OSWorkflowProcess process = new OSWorkflowParser().parseOSWorkflow(workflowDescriptor);
-
- String processXML = XmlOSWorkflowProcessDumper.INSTANCE.dump(process);
- System.out.println(processXML);
-
- XmlProcessReader reader = new XmlProcessReader(
- new PackageBuilderConfiguration().getSemanticModules());
- System.setProperty( "drools.schema.validating", "false" );
- OSWorkflowProcess process2 = (OSWorkflowProcess) reader.read(new StringReader(processXML));
- assertNotNull(process2);
- }
-
-}
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/ComplexProcessTestCase.java (from rev 24383, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/ComplexProcessTestCase.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/ComplexProcessTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/ComplexProcessTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,69 @@
+package org.drools.osworkflow.test;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.drools.osworkflow.DroolsWorkflow;
+
+import com.opensymphony.workflow.InvalidActionException;
+import com.opensymphony.workflow.InvalidEntryStateException;
+import com.opensymphony.workflow.InvalidInputException;
+import com.opensymphony.workflow.InvalidRoleException;
+import com.opensymphony.workflow.Workflow;
+import com.opensymphony.workflow.WorkflowException;
+import com.opensymphony.workflow.config.DefaultConfiguration;
+import com.opensymphony.workflow.spi.Step;
+
+public class ComplexProcessTestCase extends TestCase {
+
+ public void testComplexProcess() {
+ Workflow workflow = new DroolsWorkflow();
+ DefaultConfiguration config = new DefaultConfiguration();
+ workflow.setConfiguration(config);
+ try {
+ long id = workflow.initialize("entrevista", 1, null);
+ Collection<Step> currentSteps = workflow.getCurrentSteps(id);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 1
+ Step currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ int[] availableActions = workflow.getAvailableActions(id, Collections.EMPTY_MAP);
+ //verify we only have 6 available actions
+ assertEquals("Unexpected number of available actions", 6, availableActions.length);
+ workflow.doAction(id, 2, null);
+ currentSteps = workflow.getCurrentSteps(id);
+ //verify we have two current step
+ assertEquals("Unexpected number of current steps", 2, currentSteps.size());
+ //verify it's step 1
+ currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ availableActions = workflow.getAvailableActions(id, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 3
+ assertEquals("Unexpected available action", 3, availableActions[0]);
+
+ } catch (InvalidActionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InvalidRoleException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InvalidInputException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InvalidEntryStateException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (WorkflowException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/ComplexProcessTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/DroolsOSWorkFlowTestCase.java (from rev 24383, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/DroolsOSWorkFlowTestCase.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/DroolsOSWorkFlowTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/DroolsOSWorkFlowTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,132 @@
+package org.drools.osworkflow.test;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.drools.osworkflow.DroolsWorkflow;
+
+import com.opensymphony.workflow.InvalidInputException;
+import com.opensymphony.workflow.Workflow;
+import com.opensymphony.workflow.WorkflowException;
+import com.opensymphony.workflow.config.DefaultConfiguration;
+import com.opensymphony.workflow.spi.Step;
+import com.opensymphony.workflow.spi.WorkflowEntry;
+
+public class DroolsOSWorkFlowTestCase extends TestCase {
+
+ private String resource;
+
+
+ private DroolsOSWorkFlowTestCase(String xmlname) {
+ super("testPrimer");
+ this.resource = xmlname;
+ }
+
+ public static TestSuite suite() {
+ InnerTestSuite suite = new InnerTestSuite();
+ addResources(suite);
+ return suite;
+ }
+
+
+ public static void addResources(InnerTestSuite suite) {
+ suite.addTestFor("simple");
+ }
+
+
+ /**
+ * Testcase.
+ */
+ public void testPrimer() {
+ Workflow workflow = new DroolsWorkflow();
+ DefaultConfiguration config = new DefaultConfiguration();
+ workflow.setConfiguration(config);
+ try {
+ long workflowId = workflow.initialize(this.resource, 1, null);
+
+ Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertNumberOfCurrentSteps(1, currentSteps.size());
+ //verify it's step 1
+ Step currentStep = currentSteps.iterator().next();
+ assertCurrentStep(1,currentStep);
+ int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 2
+ assertEquals("Unexpected available action", 2, availableActions[0]);
+
+ workflow.doAction(workflowId, 2, null);
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 1
+ currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 3
+ assertEquals("Unexpected available action", 3, availableActions[0]);
+
+ workflow.doAction(workflowId, 3, null);
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have no more current steps
+ assertEquals("Unexpected number of current steps", 0, currentSteps.size());
+ //verify process completed
+ assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have no available action
+ assertEquals("Unexpected number of available actions", 0, availableActions.length);
+ }
+ catch (InvalidInputException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ catch (WorkflowException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+
+ private void assertCurrentStep (int stepIteration , long expectedStepId) {
+ assertEquals("Unexpected current step", stepIteration, expectedStepId);
+ }
+
+ public void assertCurrentStep (int stepIteration , Step currentStep) {
+ assertCurrentStep (stepIteration, currentStep.getId());
+ }
+
+ public void assertAvaliableActions (int stepIdIteration, int expectedAvaliableActions) {
+ assertEquals("Unexpected number of available actions", 1, expectedAvaliableActions);
+ }
+
+ public void assertWFState (Workflow workflow, int stepId , int expectedStateId) {
+// int wId = workflow.getHistorySteps(id)
+// assertEquals("Unexpected state", expectedStateId, workflow.getEntryState(id))
+ }
+
+ public void assertNumberOfCurrentSteps(int stepIteration , int expectedSteps) {
+ assertEquals("Unexpected number of current steps", stepIteration, expectedSteps);
+ }
+
+ /**
+ * @author ar26818347
+ */
+ private static class InnerTestSuite extends TestSuite {
+
+ public DroolsOSWorkFlowTestCase addTestFor(String xmlname) {
+ DroolsOSWorkFlowTestCase test = new DroolsOSWorkFlowTestCase(xmlname);
+ this.addTest(test);
+ return test;
+ }
+
+
+ }
+}
+
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/DroolsOSWorkFlowTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple2ProcessTest.java (from rev 24498, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple2ProcessTest.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple2ProcessTest.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple2ProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,127 @@
+package org.drools.osworkflow.test;
+
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.drools.osworkflow.DroolsWorkflow;
+import org.drools.osworkflow.OSWorkflowParser;
+import org.drools.osworkflow.composite.CompositeWorkflow;
+import org.drools.osworkflow.core.OSWorkflowProcess;
+import org.drools.osworkflow.xml.OSWorkflowSemanticModule;
+import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
+import org.drools.xml.SemanticModules;
+import org.drools.xml.XmlProcessReader;
+
+import com.opensymphony.workflow.InvalidInputException;
+import com.opensymphony.workflow.Workflow;
+import com.opensymphony.workflow.WorkflowException;
+import com.opensymphony.workflow.config.DefaultConfiguration;
+import com.opensymphony.workflow.loader.WorkflowDescriptor;
+import com.opensymphony.workflow.spi.Step;
+import com.opensymphony.workflow.spi.WorkflowEntry;
+
+public class Simple2ProcessTest extends TestCase {
+
+ public void testSimpleProcess() {
+ Workflow workflow = new DroolsWorkflow();
+ DefaultConfiguration config = new DefaultConfiguration();
+ workflow.setConfiguration(config);
+ try {
+ long workflowId = workflow.initialize("simple2", 1, null);
+
+ Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 1
+ Step currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 2
+ assertEquals("Unexpected available action", 2, availableActions[0]);
+
+ workflow.doAction(workflowId, 2, null);
+
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we have two current steps
+ assertEquals("Unexpected number of current steps", 2, currentSteps.size());
+ //verify it's step 2 and 3
+ List<Integer> currentStepIds = new ArrayList<Integer>();
+ for (Step step: currentSteps) {
+ currentStepIds.add((int) step.getId());
+ }
+ assertTrue("Current step 2 not found", currentStepIds.contains(2));
+ assertTrue("Current step 3 not found", currentStepIds.contains(3));
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we have two available actions
+ assertEquals("Unexpected number of available actions", 2, availableActions.length);
+ //verify it's action 3 and 4
+ List<Integer> availableActionIds = new ArrayList<Integer>();
+ for (int availableAction: availableActions) {
+ availableActionIds.add(availableAction);
+ }
+ assertTrue("Available action 3 not found", availableActionIds.contains(3));
+ assertTrue("Available action 4 not found", availableActionIds.contains(4));
+
+ workflow.doAction(workflowId, 3, null);
+
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 3
+ currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 3, currentStep.getStepId());
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 4
+ assertEquals("Unexpected available action", 4, availableActions[0]);
+
+ workflow.doAction(workflowId, 4, null);
+
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have no more current steps
+ assertEquals("Unexpected number of current steps", 0, currentSteps.size());
+ //verify process completed
+ assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have no available action
+ assertEquals("Unexpected number of available actions", 0, availableActions.length);
+
+ } catch (InvalidInputException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ } catch (WorkflowException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+
+ public void testToXML() throws Exception {
+ DefaultConfiguration config = new DefaultConfiguration();
+ config.load(null);
+ WorkflowDescriptor workflowDescriptor = config.getWorkflow("simple2");
+ OSWorkflowProcess process = new OSWorkflowParser().parseOSWorkflow(workflowDescriptor);
+
+ String processXML = XmlOSWorkflowProcessDumper.INSTANCE.dump(process);
+ System.out.println(processXML);
+
+ SemanticModules semanticModules = new SemanticModules();
+ semanticModules.addSemanticModule(new OSWorkflowSemanticModule());
+ XmlProcessReader reader = new XmlProcessReader(semanticModules);
+ System.setProperty( "drools.schema.validating", "false" );
+ OSWorkflowProcess process2 = (OSWorkflowProcess) reader.read(new StringReader(processXML));
+ assertNotNull(process2);
+ }
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple2ProcessTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple3ProcessTest.java (from rev 24383, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/Simple3ProcessTest.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple3ProcessTest.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple3ProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,55 @@
+package org.drools.osworkflow.test;
+
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.drools.osworkflow.DroolsWorkflow;
+import org.drools.osworkflow.OSWorkflowParser;
+import org.drools.osworkflow.core.OSWorkflowProcess;
+import org.drools.osworkflow.xml.OSWorkflowSemanticModule;
+import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
+import org.drools.xml.SemanticModules;
+import org.drools.xml.XmlProcessReader;
+
+import com.opensymphony.workflow.InvalidInputException;
+import com.opensymphony.workflow.Workflow;
+import com.opensymphony.workflow.WorkflowException;
+import com.opensymphony.workflow.config.DefaultConfiguration;
+import com.opensymphony.workflow.loader.WorkflowDescriptor;
+import com.opensymphony.workflow.spi.Step;
+import com.opensymphony.workflow.spi.WorkflowEntry;
+
+public class Simple3ProcessTest extends TestCase {
+
+ public void testSimpleProcess() {
+ Workflow workflow = new DroolsWorkflow();
+ DefaultConfiguration config = new DefaultConfiguration();
+ workflow.setConfiguration(config);
+ try {
+ long workflowId = workflow.initialize("holiday2", 100, null);
+ Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify it's step 1
+ Step currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 1
+ assertEquals("Unexpected available action", 1, availableActions[0]);
+
+
+ }
+ catch (Exception e) {
+ int a = 1;
+ }
+
+ }
+
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/Simple3ProcessTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleDroolsFlowTestCase.java (from rev 24383, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleDroolsFlowTestCase.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleDroolsFlowTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleDroolsFlowTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,43 @@
+package org.drools.osworkflow.test;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.TestCase;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
+import org.drools.compiler.PackageBuilder;
+import org.drools.rule.Package;
+
+public class SimpleDroolsFlowTestCase extends TestCase {
+
+ public void testSimple() {
+ try {
+ // load the process
+ RuleBase ruleBase = createKnowledgeBase();
+ // create a new session
+ StatefulSession session = ruleBase.newStatefulSession();
+ // start a new process instance
+ session.startProcess("simple");
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ private RuleBase createKnowledgeBase() throws Exception {
+ // create a builder
+ PackageBuilder builder = new PackageBuilder();
+ // load the process
+ Reader source = new InputStreamReader(SimpleDroolsFlowTestCase.class
+ .getResourceAsStream("/simple.rf"));
+ builder.addProcessFromXml(source);
+ // create the knowledge base
+ Package pkg = builder.getPackage();
+ RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+ ruleBase.addPackage(pkg);
+ return ruleBase;
+ }
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleDroolsFlowTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleProcessTest.java (from rev 24383, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/SimpleProcessTest.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleProcessTest.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleProcessTest.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,96 @@
+package org.drools.osworkflow.test;
+
+import java.io.StringReader;
+import java.util.Collection;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.drools.compiler.PackageBuilderConfiguration;
+import org.drools.osworkflow.DroolsWorkflow;
+import org.drools.osworkflow.OSWorkflowParser;
+import org.drools.osworkflow.composite.CompositeWorkflow;
+import org.drools.osworkflow.core.OSWorkflowProcess;
+import org.drools.osworkflow.xml.XmlOSWorkflowProcessDumper;
+import org.drools.xml.XmlProcessReader;
+
+import com.opensymphony.workflow.InvalidInputException;
+import com.opensymphony.workflow.Workflow;
+import com.opensymphony.workflow.WorkflowException;
+import com.opensymphony.workflow.config.DefaultConfiguration;
+import com.opensymphony.workflow.loader.WorkflowDescriptor;
+import com.opensymphony.workflow.spi.Step;
+import com.opensymphony.workflow.spi.WorkflowEntry;
+
+public class SimpleProcessTest extends TestCase {
+
+ public void testSimpleProcess() {
+ Workflow workflow = new DroolsWorkflow();
+ DefaultConfiguration config = new DefaultConfiguration();
+ workflow.setConfiguration(config);
+ try {
+ long workflowId = workflow.initialize("simple", 1, null);
+
+ Collection<Step> currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 1
+ Step currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ int[] availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 2
+ assertEquals("Unexpected available action", 2, availableActions[0]);
+
+ workflow.doAction(workflowId, 2, null);
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have one current step
+ assertEquals("Unexpected number of current steps", 1, currentSteps.size());
+ //verify it's step 1
+ currentStep = currentSteps.iterator().next();
+ assertEquals("Unexpected current step", 1, currentStep.getStepId());
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have one available action
+ assertEquals("Unexpected number of available actions", 1, availableActions.length);
+ //verify it's action 3
+ assertEquals("Unexpected available action", 3, availableActions[0]);
+
+ workflow.doAction(workflowId, 3, null);
+ currentSteps = workflow.getCurrentSteps(workflowId);
+ //verify we only have no more current steps
+ assertEquals("Unexpected number of current steps", 0, currentSteps.size());
+ //verify process completed
+ assertEquals("Unexpected state", WorkflowEntry.COMPLETED, workflow.getEntryState(workflowId));
+
+ availableActions = workflow.getAvailableActions(workflowId, Collections.EMPTY_MAP);
+ //verify we only have no available action
+ assertEquals("Unexpected number of available actions", 0, availableActions.length);
+ } catch (InvalidInputException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ } catch (WorkflowException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+
+ public void testToXML() throws Exception {
+ DefaultConfiguration config = new DefaultConfiguration();
+ config.load(null);
+ WorkflowDescriptor workflowDescriptor = config.getWorkflow("simple");
+ OSWorkflowProcess process = new OSWorkflowParser().parseOSWorkflow(workflowDescriptor);
+
+ String processXML = XmlOSWorkflowProcessDumper.INSTANCE.dump(process);
+ System.out.println(processXML);
+
+ XmlProcessReader reader = new XmlProcessReader(
+ new PackageBuilderConfiguration().getSemanticModules());
+ System.setProperty( "drools.schema.validating", "false" );
+ OSWorkflowProcess process2 = (OSWorkflowProcess) reader.read(new StringReader(processXML));
+ assertNotNull(process2);
+ }
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/SimpleProcessTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/AbstractJPAPersistenceTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/AbstractJPAPersistenceTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/AbstractJPAPersistenceTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,77 @@
+package org.drools.osworkflow.test.persistence;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Properties;
+
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseConfiguration;
+import org.drools.RuleBaseFactory;
+import org.drools.compiler.PackageBuilder;
+import org.drools.marshalling.ProcessMarshallerRegistry;
+import org.drools.osworkflow.instance.OSWorkflowProcessInstance;
+import org.drools.osworkflow.persistence.marshaller.OSWorkflowMarshaller;
+import org.drools.rule.Package;
+
+import junit.framework.TestCase;
+
+public abstract class AbstractJPAPersistenceTestCase extends TestCase {
+
+ private EntityManagerFactory emf;
+
+ public EntityManagerFactory getEmf() {
+ return emf;
+ }
+
+ public void setEmf(EntityManagerFactory emf) {
+ this.emf = emf;
+ }
+
+
+ protected void setUp() {
+ emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
+ }
+
+ protected void tearDown() {
+ emf.close();
+ }
+
+ protected Properties setupCommonProperties() {
+ Properties properties = new Properties();
+ properties.put("processInstanceManagerFactory",
+ "org.drools.persistence.processinstance.JPAProcessInstanceManagerFactory");
+ properties.put("workItemManagerFactory", "org.drools.persistence.processinstance.JPAWorkItemManagerFactory");
+ properties.put("processSignalManagerFactory", "org.drools.persistence.processinstance.JPASignalManagerFactory");
+ //TODO configure this with IOC
+ ProcessMarshallerRegistry.INSTANCE.register(OSWorkflowProcessInstance.class, OSWorkflowMarshaller.INSTANCE);
+ return properties;
+ }
+
+ /**
+ * Process definition.
+ */
+ protected static RuleBase createKnowledgeBase(RuleBaseConfiguration conf, String resourceName) {
+ try {
+ // create a builder
+ PackageBuilder builder = new PackageBuilder();
+ // load the process
+ Reader source = new InputStreamReader(OSWorkFlowPersistenceTestCase.class
+ .getResourceAsStream(resourceName));
+ builder.addProcessFromXml(source);
+ // create the knowledge base
+ Package pkg = builder.getPackage();
+ RuleBase ruleBase = RuleBaseFactory.newRuleBase(conf);
+ ruleBase.addPackage(pkg);
+ return ruleBase;
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ fail(e.getMessage());
+ return null;
+ }
+ }
+
+}
Added: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,43 @@
+package org.drools.osworkflow.test.persistence;
+
+import java.util.Properties;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseConfiguration;
+import org.drools.osworkflow.core.command.DoActionCommand;
+import org.drools.persistence.session.SingleSessionCommandService;
+import org.drools.process.command.GetProcessInstanceCommand;
+import org.drools.process.command.StartProcessCommand;
+import org.drools.runtime.process.ProcessInstance;
+
+public class ComplexProcessPersistenceTestCase extends AbstractJPAPersistenceTestCase {
+
+ public void testComplex() {
+ Properties properties = setupCommonProperties();
+ RuleBaseConfiguration conf = new RuleBaseConfiguration(properties);
+ // load the process
+ RuleBase ruleBase = createKnowledgeBase(conf,"/simple2rf.rf");
+
+ SingleSessionCommandService service = new SingleSessionCommandService(ruleBase);
+ StartProcessCommand startProcessCommand = new StartProcessCommand();
+ startProcessCommand.setProcessId("simple2");
+ ProcessInstance processInstance = (ProcessInstance) service.execute(startProcessCommand);
+ System.out.println("Started process instance " + processInstance.getId());
+
+ service = new SingleSessionCommandService(ruleBase);
+ GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
+ getProcessInstanceCommand.setProcessInstanceId(processInstance.getId());
+ processInstance = (ProcessInstance) service.execute(getProcessInstanceCommand);
+ assertNotNull(processInstance);
+ System.out.println("Now working with processInstance " + processInstance.getId());
+
+ service = new SingleSessionCommandService(ruleBase);
+ DoActionCommand doActionCmd = new DoActionCommand();
+ doActionCmd.setProcessInstanceId(processInstance.getId());
+ doActionCmd.setActionId(3); //Action to be executed at current step
+ service.execute(doActionCmd);
+
+
+ }
+
+}
Copied: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/OSWorkFlowPersistenceTestCase.java (from rev 24498, labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/OSWorkFlowPersistenceTestCase.java)
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/OSWorkFlowPersistenceTestCase.java (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/OSWorkFlowPersistenceTestCase.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,47 @@
+package org.drools.osworkflow.test.persistence;
+
+import java.util.Properties;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseConfiguration;
+import org.drools.osworkflow.core.command.DoActionCommand;
+import org.drools.persistence.session.SingleSessionCommandService;
+import org.drools.process.command.GetProcessInstanceCommand;
+import org.drools.process.command.StartProcessCommand;
+import org.drools.runtime.process.ProcessInstance;
+
+public class OSWorkFlowPersistenceTestCase extends AbstractJPAPersistenceTestCase {
+
+
+ public void testPersistence() {
+ Properties properties = setupCommonProperties();
+ RuleBaseConfiguration conf = new RuleBaseConfiguration(properties);
+ // load the process
+ RuleBase ruleBase = createKnowledgeBase(conf,"/simplerf.rf");
+
+ SingleSessionCommandService service = new SingleSessionCommandService(ruleBase);
+ StartProcessCommand startProcessCommand = new StartProcessCommand();
+ startProcessCommand.setProcessId("simple");
+ ProcessInstance processInstance = (ProcessInstance) service.execute(startProcessCommand);
+ System.out.println("Started process instance " + processInstance.getId());
+
+ service = new SingleSessionCommandService(ruleBase);
+ GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
+ getProcessInstanceCommand.setProcessInstanceId(processInstance.getId());
+ processInstance = (ProcessInstance) service.execute(getProcessInstanceCommand);
+ assertNotNull(processInstance);
+ System.out.println("Now working with processInstance " + processInstance.getId());
+
+
+ service = new SingleSessionCommandService(ruleBase);
+ DoActionCommand doActionCmd = new DoActionCommand();
+ doActionCmd.setProcessInstanceId(processInstance.getId());
+ doActionCmd.setActionId(3); //Action to be executed at current step
+ service.execute(doActionCmd);
+
+ }
+
+
+
+
+}
Property changes on: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/OSWorkFlowPersistenceTestCase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/suite/SimpleTestSuite.java
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/suite/SimpleTestSuite.java 2008-12-29 14:40:54 UTC (rev 24499)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/suite/SimpleTestSuite.java 2008-12-29 15:31:46 UTC (rev 24500)
@@ -3,8 +3,8 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.drools.Simple2ProcessTest;
-import org.drools.SimpleProcessTest;
+import org.drools.osworkflow.test.Simple2ProcessTest;
+import org.drools.osworkflow.test.SimpleProcessTest;
public class SimpleTestSuite extends TestCase {
Added: labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/resources/simple2rf.rf
===================================================================
--- labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/resources/simple2rf.rf (rev 0)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/resources/simple2rf.rf 2008-12-29 15:31:46 UTC (rev 24500)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process xmlns="http://drools.org/drools-4.0/osworkflow"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
+ xs:schemaLocation="http://drools.org/drools-4.0/osworkflow drools-osworkflow-4.0.xsd"
+ type="OSWorkflow" name="simple2" id="simple2" package-name="org.drools.osworkflow" >
+
+ <header>
+ </header>
+
+ <nodes>
+ <split id="1001" name="split" type="1" />
+ <step id="1" name="Stage 1" >
+ <action id="2" name="Finish Stage 1">
+ <restrict-to>
+ <conditions>
+ <condition type="class">
+ <arg name="status">Active</arg>
+ <arg name="class.name">
+ com.opensymphony.workflow.util.StatusCondition
+ </arg>
+ </condition>
+ </conditions>
+ </restrict-to>
+ <results>
+ <unconditional-result old-status="Finished" split="1001"/>
+ </results>
+ </action>
+ </step>
+ <step id="2" name="Stage 2" >
+ <action id="3" name="Finish Stage 2">
+ <restrict-to>
+ <conditions>
+ <condition type="class">
+ <arg name="status">Active</arg>
+ <arg name="class.name">
+ com.opensymphony.workflow.util.StatusCondition
+ </arg>
+ </condition>
+ </conditions>
+ </restrict-to>
+ <results>
+ <unconditional-result old-status="Finished" join="2001"/>
+ </results>
+ </action>
+ </step>
+ <join id="2001" name="join" type="1" />
+ <step id="3" name="Stage 3" >
+ <action id="4" name="Finish Stage 3">
+ <restrict-to>
+ <conditions>
+ <condition type="class">
+ <arg name="status">Active</arg>
+ <arg name="class.name">
+ com.opensymphony.workflow.util.StatusCondition
+ </arg>
+ </condition>
+ </conditions>
+ </restrict-to>
+ <results>
+ <unconditional-result old-status="Finished" join="2001"/>
+ </results>
+ </action>
+ </step>
+ <step id="4" name="Stage 4" >
+ </step>
+ </nodes>
+
+ <connections>
+ <connection from="1" fromType="2" to="1001" />
+ <connection from="1001" to="2" toType="Active" />
+ <connection from="2" fromType="3" to="2001" />
+ <connection from="3" fromType="4" to="2001" />
+ <connection from="1001" to="3" toType="Active" />
+ <connection from="2001" to="4" toType="Active" />
+ </connections>
+
+</process>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list