Package de.danet.an.workflow.api

Examples of de.danet.an.workflow.api.Process.state()


    public void createProcess1AndRemoveProcessDef() throws Exception
  ProcessDefinitionDirectory pdd = null;
  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("ut-process", "jut1", cont);
      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
View Full Code Here


  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("ut-process", "jut1", cont);
      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
    = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
View Full Code Here

    public void createProcess1AndRemoveProcessDef() throws Exception
  ProcessDefinitionDirectory pdd = null;
  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("ut-process", "jut1", cont);
      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
View Full Code Here

  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("ut-process", "jut1", cont);
      assertTrue(process.state().startsWith("open.not_running.not_started"));
      process.start();
      assertTrue(process.state().startsWith("open.running"));
      // remove its process definition
      pdd = workflowService().processDefinitionDirectory ();
      ProcessDefinition pd
    = pdd.lookupProcessDefinition("ut-process", "jut1");
      assertTrue(pd!=null);
View Full Code Here

     */
    public void removejut1() throws Exception {
  WfRequester req = new DefaultRequester(workflowService);
  // create the process
  Process process = (Process)(createProcess("ut-process", "jut1", 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 first two activities and stop it.
View Full Code Here

  // create the process
  Process process = (Process)(createProcess("ut-process", "jut1", 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 first two activities and stop it.
  Collection c = process.steps();
  for (int i = 1; i <= 2; i++) {
      WfActivity a = null;
View Full Code Here

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

  // try to remove the process (should result into an exception)
  boolean removeExceptionCaught = false;
  try {
      //Process p = processDirectory().lookupProcess(null, process.key());
View Full Code Here

      a.resume();
      Thread.sleep (1000);
      assertTrue(a.name() + " not closed.completed: " + a.state(),
             a.state().startsWith("closed.completed"));
  }
  assertTrue(process + " not closed.completed: " + process.state(),
       process.state().startsWith("closed.completed"));
 
  // finally remove the process and retry to access it
  boolean exceptionCaught = false;
  Process p = processDirectory().lookupProcess(null, process.key());
View Full Code Here

      Thread.sleep (1000);
      assertTrue(a.name() + " not closed.completed: " + a.state(),
             a.state().startsWith("closed.completed"));
  }
  assertTrue(process + " not closed.completed: " + process.state(),
       process.state().startsWith("closed.completed"));
 
  // finally remove the process and retry to access it
  boolean exceptionCaught = false;
  Process p = processDirectory().lookupProcess(null, process.key());
  processDirectory().removeProcess(process);
View Full Code Here

  WfRequester req = new DefaultRequester(workflowService);
  ProcessDirectory procDir = processDirectory();
  // create the process
  Process process = (Process)(createProcess("ut-process", "jut5", req));
  String processKey = process.key();
  assertTrue(process.state().equals("open.not_running.not_started"));
  // start the process
  process.start();
  assertTrue(process.state().startsWith("open.running"));
  Thread.sleep (1000);
  process.suspend();
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.