[jboss-svn-commits] JBL Code SVN: r24642 - labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Jan 9 14:28:59 EST 2009
Author: mfossati
Date: 2009-01-09 14:28:59 -0500 (Fri, 09 Jan 2009)
New Revision: 24642
Modified:
labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java
Log:
Test for a more complex process
Modified: 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 2009-01-09 17:44:20 UTC (rev 24641)
+++ labs/jbossrules/branches/mfossati/drools-osworkflow/src/test/java/org/drools/osworkflow/test/persistence/ComplexProcessPersistenceTestCase.java 2009-01-09 19:28:59 UTC (rev 24642)
@@ -16,11 +16,11 @@
Properties properties = setupCommonProperties();
RuleBaseConfiguration conf = new RuleBaseConfiguration(properties);
// load the process
- RuleBase ruleBase = createKnowledgeBase(conf,"/simple2rf.rf");
+ RuleBase ruleBase = createKnowledgeBase(conf,"/entrevistarf.rf");
SingleSessionCommandService service = new SingleSessionCommandService(ruleBase);
StartProcessCommand startProcessCommand = new StartProcessCommand();
- startProcessCommand.setProcessId("simple2");
+ startProcessCommand.setProcessId("entrevista");
ProcessInstance processInstance = (ProcessInstance) service.execute(startProcessCommand);
System.out.println("Started process instance " + processInstance.getId());
@@ -37,6 +37,26 @@
doActionCmd.setActionId(2); //Action to be executed at current step
service.execute(doActionCmd);
+ service = new SingleSessionCommandService(ruleBase);
+ 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);
+ doActionCmd = new DoActionCommand();
+ doActionCmd.setProcessInstanceId(processInstance.getId());
+ doActionCmd.setActionId(4); //Action to be executed at current step
+ service.execute(doActionCmd);
+
+ service = new SingleSessionCommandService(ruleBase);
+ getProcessInstanceCommand = new GetProcessInstanceCommand();
+ getProcessInstanceCommand.setProcessInstanceId(processInstance.getId());
+ processInstance = (ProcessInstance) service.execute(getProcessInstanceCommand);
+ assertNotNull(processInstance);
+ System.out.println("Now working with processInstance " + processInstance.getId());
}
More information about the jboss-svn-commits
mailing list