Package de.danet.an.workflow.omgcore

Examples of de.danet.an.workflow.omgcore.WfProcess.start()


  assertTrue(processRemoved);

  mgr = defDir.processMgr("SystemTest", "completeRemoval");
  proc = mgr.createProcess(requester);
  procKey = proc.key();
  proc.start();
  // Assure that process has been removed automatically
  processRemoved = false;
  int maxRetries = 5;
  boolean test = true;
  while (test){
View Full Code Here


     */
    public void testPath() throws Exception {
  List msgList = importProcessDefinition("/process/transition1.xml");
  ProcessMgr mgr = defDir.processMgr("SystemTest", "simplePath");
  WfProcess proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue(stateReached(proc, "closed.completed",
        "closed.completed"));
  ProcessData data = proc.processContext();
  assertTrue(((String)data.get("TransitionPath"))
View Full Code Here

       .equals("PATH:act1:act2:act3"));
  procDir.removeProcess(proc);

  mgr = defDir.processMgr("SystemTest", "block_2_in_2_out");
  proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue("Process not completed in time",
       stateReached(proc, "closed.completed",
        "closed.completed"));
  data = proc.processContext();
View Full Code Here

  List msgList = importProcessDefinition("/process/loop.xml");
  assertTrue(msgList.size() == 0);
  ProcessMgr mgr = defDir.processMgr("SystemTest", "loop_3_times");
  WfProcess proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue(stateReached(proc, "closed.completed"));
  ProcessData data = proc.processContext();
  assertTrue(((Long)data.get("Counter")).intValue() == 3);
  procDir.removeProcess(proc);
View Full Code Here

     */
    public void testCascade() throws Exception {
  // Uses XPDL imported by testLoop
  ProcessMgr mgr = defDir.processMgr("SystemTest", "cascade");
  WfProcess proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue(stateReached(proc, "closed.completed"));
  ProcessData data = proc.processContext();
  assertTrue(((Boolean)data.get("completed"))
       .equals(Boolean.TRUE));
View Full Code Here

     */
    public void testScrabble() throws Exception {
  // Uses XPDL imported by testLoop
  ProcessMgr mgr = defDir.processMgr("SystemTest", "scrabble");
  WfProcess proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue(stateReached(proc, "closed.completed"));
  ProcessData data = proc.processContext();
  assertTrue(((String)data.get("compound")).equals("DANET"));
  procDir.removeProcess(proc);
View Full Code Here

     */
    public void testAndSplitOtherwise() throws Exception {
  // Uses XPDL imported by testLoop
  ProcessMgr mgr = defDir.processMgr("SystemTest", "andOtherwiseTest");
  WfProcess proc = mgr.createProcess(requester);
  proc.start();
  // Wait for completion
  assertTrue(stateReached(proc, "closed.completed"));
  ProcessData data = proc.processContext();
  assertTrue(((Boolean)data.get("Success")).equals(Boolean.TRUE));
  assertTrue(((Boolean)data.get("Error")).equals(Boolean.FALSE));
View Full Code Here

    public void loopTest() throws Exception {
  ProcessMgr mgr = defDir.processMgr
      ("deferredChoiceTests", "loopingDeferredChoiceTest");
  WfProcess proc = mgr.createProcess(requester);
  String procKey = proc.key();
  proc.start();
  assertTrue(stateReached(proc, "closed.completed"));
  ProcessData data = proc.processContext();
  String path = (String)data.get("Path");
  assertTrue(path, path.equals("Path:ACT0:ACT1:ACT2:ACT5:ACT1:ACT2:ACT5"
             + ":ACT1:ACT3:ACT5:ACT1:ACT3:ACT5"));
View Full Code Here

    public void terminateProcessTest() throws Exception {
  ProcessMgr mgr = defDir.processMgr
      ("deferredChoiceTests", "terminateTest");
  WfProcess proc = mgr.createProcess(requester);
  String procKey = proc.key();
  proc.start();
  assertTrue(stateReached(proc, "open.running"));
  proc.terminate ();
  assertTrue(stateReached(proc, "closed.terminated"));
  procDir.removeProcess(proc);
    }
View Full Code Here

    public void terminateActivityTest() throws Exception {
  ProcessMgr mgr = defDir.processMgr
      ("deferredChoiceTests", "terminateTest");
  WfProcess proc = mgr.createProcess(requester);
  String procKey = proc.key();
  proc.start();
  Activity act2 = null;
  Activity act3 = null;
  assertTrue(stateReached(proc, "open.running"));
  for (Iterator i = proc.steps().iterator (); i.hasNext ();) {
      Activity a = (Activity)i.next ();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.