Package de.danet.an.workflow.api

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


     * Create a new process and then remove its process definition.
     */
    public void createProcessAndRemoveProcessDef() throws Exception
  ProcessDefinitionDirectory pdd = null;
  try {
      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess("N1", "N2", cont);
      process.start();
      Thread.sleep(5000);

      // get processdata
View Full Code Here


        throws Exception {
  ProcessDefinitionDirectory pdd = null;
  try {
      pdd = workflowService().processDefinitionDirectory();
      WfProcessMgr pmgr = pdd.processMgr(pkgId, prcId);
      return pmgr.createProcess (new DefaultRequester(workflowService()));
  } finally {
      workflowService().release (pdd);
  }
    }
View Full Code Here

        ProcessDefinitionDirectory pdd = null;
        try {
            pdd = wsc.getWorkflowService().processDefinitionDirectory();
            ProcessMgr pmgr = pdd.processMgr(packageId, processId);
            Process p = (Process)pmgr.createProcess
                (new DefaultRequester(wsc.getWorkflowService()));
            if (isStartInDebugMode()) {
                p.setDebugEnabled (true);
            }
            p.start ();
            setStartInDebugMode(false);
View Full Code Here

        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("xmlrpctests", "addNumbers");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            procDir.removeProcess(process);
        } finally {
            workflowService.release (procDefDir);
View Full Code Here

        try {
            procDefDir = workflowService.processDefinitionDirectory();
            procDir = workflowService.processDirectory();
            ProcessMgr pmgr = procDefDir.processMgr ("xmlrpctests", "echoXml");
            WfProcess process
                = pmgr.createProcess(new DefaultRequester (workflowService));
            process.start();
            assertTrue (stateReached (process, "closed.completed"));
            procDir.removeProcess(process);
        } finally {
            workflowService.release (procDefDir);
View Full Code Here

     * Test association of process and requester.
     */
    public void testAssoc() throws Exception {
  EventLogger evtlog1 = new EventLogger();
  WfRequester cont1
      = new DefaultRequester(workflowService(), evtlog1);
  Process proc1a = (Process)createProcess("ut-process", "jut1", cont1);
  assertTrue (proc1a.requester().equals (cont1));
  Process proc1b = (Process)createProcess("ut-process", "jut1", cont1);
  assertTrue (proc1b.requester().equals (cont1));
  EventLogger evtlog2 = new EventLogger();
  WfRequester cont2 = new DefaultRequester(workflowService(), evtlog2);
  assertTrue (!cont2.equals (cont1));
  Process proc2 = (Process)createProcess("ut-process", "jut1", cont2);
  assertTrue (proc2.requester().equals (cont2));
  Collection c1 = cont1.performers();
  assertTrue (c1.size() == 2);
  boolean foundA = false
View Full Code Here

      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("timing", "wait_test1");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
View Full Code Here

      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("timing", "wait_test2");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
View Full Code Here

      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("timing", "simple_test");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      ProcessData pd = process.processContext();
      assertTrue ("EXPIRED".equals(pd.get("waitResult")));
      procDir.removeProcess(process);
View Full Code Here

      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("timing", "expired_test");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      ProcessData pd = process.processContext();
      assertTrue ("EXPIRED".equals(pd.get("waitResult")));
      procDir.removeProcess(process);
View Full Code Here

TOP

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

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.