Package de.danet.an.workflow.omgcore

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


  WfProcess process = createProcess("ut-process", "jut2", req);
  assertTrue(process.state().equals("open.not_running.not_started"));
  process.start();
  assertTrue(process.state().equals("open.running"));
  process.suspend();
  assertTrue(process.state().equals("open.not_running.suspended"));
  process.resume();
  assertTrue(process.state().equals("open.running"));
    }

    private boolean allActivitiesOfProcessHaveState (WfProcess proc,
View Full Code Here


  process.start();
  assertTrue(process.state().equals("open.running"));
  process.suspend();
  assertTrue(process.state().equals("open.not_running.suspended"));
  process.resume();
  assertTrue(process.state().equals("open.running"));
    }

    private boolean allActivitiesOfProcessHaveState (WfProcess proc,
                 String state)
  throws Exception {
View Full Code Here

     */
    public void processjut2() throws Exception {
  WfRequester req = new DefaultRequester(workflowService);
  // create the process
  WfProcess process = createProcess("ut-process", "jut2", 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.
View Full Code Here

  // create the process
  WfProcess process = createProcess("ut-process", "jut2", 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.
  for (int i = 1; i <= 4; i++) {
      Collection c = process.steps();
      WfActivity a = null;
View Full Code Here

      a.resume();
      Thread.sleep (1000);
      assertTrue(a.name() + " not closed.completed: " + a.state(),
           a.state().startsWith("closed.completed"));
  }
  assertTrue(process.state().startsWith("closed.completed"));
    }

    /**
     * Test a process definition with XOR-splitted activity.
     * The activities will be started manually and stopped manually one
View Full Code Here

     */
    public void processjut4() throws Exception {
  WfRequester req = new DefaultRequester(workflowService);
  // create the process
  WfProcess process = createProcess("ut-process", "jut4", 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.
View Full Code Here

  // create the process
  WfProcess process = createProcess("ut-process", "jut4", 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 == 4);
  Arrays.sort (actArray, new Comparator () {
View Full Code Here

  assertTrue(a44.state().startsWith("open.not_running.suspended"));
  // start A44
  a44.resume();
  Thread.sleep (1000);
  // process terminated
  assertTrue(process.state().startsWith("closed.completed"));
    }

    /**
     * Test a complex process definition.
     * The activities will be finished manually.
View Full Code Here

     */
    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.
View Full Code Here

  // 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 () {
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.