[jboss-user] [jBPM] New message: "Re: Test workflow with JUnit"
tamisier laure
do-not-reply at jboss.com
Wed Feb 24 08:44:30 EST 2010
User development,
A new message was posted in the thread "Test workflow with JUnit":
http://community.jboss.org/message/528183#528183
Author : tamisier laure
Profile : http://community.jboss.org/people/lauretamisier
Message:
--------------------------------------------------------------
here he test which runs !!!! t
import org.jbpm.api.ProcessInstance;
import org.jbpm.test.JbpmTestCase;
public class StateTest extends JbpmTestCase {
String deploymentId;
protected void setUp() throws Exception {
super.setUp();
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("fr/ucanss/workflow/test.jpdl.xml")
.deploy();
}
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
public void testMainScenario() {
ProcessInstance processInstance =
executionService.startProcessInstanceByKey("test");
assertNotNull("instance should be not null", processInstance);
for (String act:processInstance.findActiveActivityNames()){
System.out.println("Activity " + act);
}
assertActivityActive(processInstance.getId(), "ok");
executionService.signalExecutionById(processInstance.getId(), "to end");
assertProcessInstanceEnded(processInstance);
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528183#528183
More information about the jboss-user
mailing list