* The activities will be finished manually.
*/
public void processjut6() throws Exception {
WfRequester req = new DefaultRequester(workflowService);
// create the process
WfProcess process = createProcess("ut-process", "jut6", req);
assertTrue(process.state().equals("open.not_running.not_started"));
// start the process
process.start();
assertTrue(process.state().startsWith("open.running"));
Thread.sleep (1000);
// start the activities and stop it.
Object[] actArray = process.steps().toArray();
assertTrue(actArray.length == 8);
Arrays.sort (actArray, new Comparator () {
public int compare (Object o1, Object o2) {
return ((WfActivity)o1).toString()
.compareTo (((WfActivity)o2).toString());
}
});
WfActivity a61 = (WfActivity)actArray[0];
WfActivity a62 = (WfActivity)actArray[1];
WfActivity a63 = (WfActivity)actArray[2];
WfActivity a64 = (WfActivity)actArray[3];
WfActivity a65 = (WfActivity)actArray[4];
WfActivity a66 = (WfActivity)actArray[5];
WfActivity a67 = (WfActivity)actArray[6];
WfActivity a68 = (WfActivity)actArray[7];
// start A61
assertTrue(a61.state().startsWith("open.not_running.suspended"));
a61.resume();
Thread.sleep (1000);
assertTrue(a62.state().startsWith("open.not_running.not_started"));
assertTrue(a63.state().startsWith("open.not_running.suspended"));
assertTrue(a64.state().startsWith("open.not_running.not_started"));
// start A63
a63.resume();
Thread.sleep (1000);
assertTrue(a66.state().startsWith("open.not_running.suspended"));
assertTrue(a65.state().startsWith("open.not_running.not_started"));
// start A66 and then stop it.
a66.resume();
Thread.sleep (1000);
// start A67
a67.resume();
Thread.sleep (1000);
// start A68
a68.resume();
Thread.sleep (1000);
// process terminated
assertTrue(process.state().startsWith("closed.completed"));
}