Package de.danet.an.workflow.api

Examples of de.danet.an.workflow.api.ProcessMgr


      }
  }

  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);
View Full Code Here


     * Test conditions by use of a cascading process.
     * @exception Exception if an error occurs
     */
    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"))
View Full Code Here

     * Test conditions by use of a cascading process.
     * @exception Exception if an error occurs
     */
    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"));
View Full Code Here

     * Test correct handling of OTHERWISE case within an AND split.
     * @exception Exception if an error occurs
     */
    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));
View Full Code Here

    /**
     * Test activitiy information for minimal and full description.
     * @exception Exception if an error occurs
     */
    public void testActivities() throws Exception {
  ProcessMgr mgrMin = defDir.processMgr("SystemTest_minimal", "minimal");
  ProcessMgr mgrFull = defDir.processMgr("SystemTest_full", "full");
//   WfProcess proc1 = mgrMin.createProcess(requester);
//   WfProcess proc2 = mgrFull.createProcess(requester);
//   WfProcess proc3 = mgrFull.createProcess(requester);
  WrappedProcess proc1
      = new WrappedProcess(mgrMin.createProcess(requester));
  WrappedProcess proc2
      = new WrappedProcess(mgrFull.createProcess(requester));
  WrappedProcess proc3
      = new WrappedProcess(mgrFull.createProcess(requester));

  // Test activity of process 1
  assertTrue(proc1.steps().size() == 1);
  WrappedActivity act = (WrappedActivity)proc1.steps().toArray()[0];
  assertTrue(act.assignments().size() == 0);
View Full Code Here

    /**
     * Test activitiy information for second block activity
     * @exception Exception if an error occurs
     */
    public void testActivitiesBlock1() throws Exception {
  ProcessMgr mgr = defDir.processMgr("SystemTest", "block_2_in_2_out");
  //WfProcess proc = mgr.createProcess(requester);
  WrappedProcess proc = new WrappedProcess(mgr.createProcess(requester));

  // Test activities of process
  assertTrue(proc.steps().size() == 9);
  Iterator it = proc.steps().iterator();
  List acts = new LinkedList();
View Full Code Here

    /**
     * Test activitiy information for second block activity
     * @exception Exception if an error occurs
     */
    public void testActivitiesBlock2() throws Exception {
  ProcessMgr mgr = defDir.processMgr("SystemTest", "block_diamond");
  //  WfProcess proc = mgr.createProcess(requester);
  WrappedProcess proc = new WrappedProcess(mgr.createProcess(requester));
  // Test activities of process
  assertTrue(proc.steps().size() == 15);
  Iterator it = proc.steps().iterator();
  List acts = new LinkedList();
  while (it.hasNext()) {
View Full Code Here

    /**
     * Test.
     * @exception Exception if an error occurs
     */
    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");
View Full Code Here

    /**
     * Test.
     * @exception Exception if an error occurs
     */
    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"));
View Full Code Here

    /**
     * Test.
     * @exception Exception if an error occurs
     */
    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"));
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.api.ProcessMgr

Copyright © 2018 www.massapicom. 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.