Package de.danet.an.workflow.api

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


 
    /**
     *
     */
    public void processjutToolInvocation() throws Exception {
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process
      = createProcess("ut-process", "jut_tool_invocation", req);
  assertTrue(process.state().equals("open.not_running.not_started"));
  // start the process
View Full Code Here


     * @throws Exception ...
     */
    public void createProcessAndProcessContextChanged() throws Exception {
 
  // create the required  process
        WfRequester req = new DefaultRequester (workflowService());
  process = createProcess("ut-procdef-audit", "auditTest", req);
  assertTrue(process!=null);

  // wait some time because of asynchronous processing
  long anfang = System.currentTimeMillis();
View Full Code Here

    public void waitForCompletion () throws Exception {
  // Obtain subscriber
  EventSubscriber subs = workflowService().createEventSubscriber ();

  // create the required  process
        WfRequester req = new DefaultRequester (workflowService());
  process = createProcess("ut-procdef-audit", "auditTest2", req);
  String procKey = process.key();
  assertTrue(process!=null);
  process.start ();
View Full Code Here

    public void testFilters () throws Exception {
  // Obtain subscribers
  EventSubscriber subs = workflowService().createEventSubscriber ();

  // create the required  process
        WfRequester req = new DefaultRequester (workflowService());
  process = createProcess("ut-procdef-audit", "auditTest2", req);
  String procKey = process.key();
  assertTrue(process != null);

  // additional subscribers
View Full Code Here


    public void testStateFilter () throws Exception {
  // Obtain subscribers
  // create the required  process
        WfRequester req = new DefaultRequester (workflowService());
  process = createProcess("ut-procdef-audit", "auditStateOnly", req);
  assertTrue(process != null);
  process.start ();
  assertTrue (stateReached (process, "closed"));
  int hs = process.history().size ();
View Full Code Here

    }

    public void testClosedFilter () throws Exception {
  // Obtain subscribers
  // create the required  process
        WfRequester req = new DefaultRequester (workflowService());
  process = createProcess("ut-procdef-audit", "auditProcClosedOnly", req);
  assertTrue(process != null);
  process.start ();
  assertTrue (stateReached (process, "closed"));
  int hs = process.history().size ();
View Full Code Here

 
    /**
     * Create a new process for the given type and start it.
     */
    public void createAndStartProcess1() throws Exception {
  WfRequester cont = new DefaultRequester(workflowService());
  WfProcess process = createProcess("ut-process", "jut1", cont);
  assertTrue(process.state().startsWith("open.not_running.not_started"));
  process.start();
  assertTrue(process.state().startsWith("open.running"));
  // get the activities
View Full Code Here

    /**
     * Create a new process for the given type and start it.
     */
    public void createAndStartProcess2() throws Exception {
  WfRequester cont = new DefaultRequester(workflowService());
  WfProcess process = createProcess("ut-process", "jut2", cont);
  assertTrue(process.state().startsWith("open.not_running.not_started"));
  process.start();
  assertTrue(process.state().startsWith("open.running"));
  // get the activities
View Full Code Here

    /**
     * Create a new process for the given type and start it.
     */
    public void createAndStartProcess3() throws Exception {
  WfRequester cont = new DefaultRequester(workflowService());
  WfProcess process = createProcess("ut-process", "jut3", cont);
  assertTrue(process.state().startsWith("open.not_running.not_started"));
  process.start();
  Thread.sleep(2500);
  assertTrue(process + " should be completed, is " + process.state(),
View Full Code Here

    /**
     * Create a new process for the given type and start it.
     */
    public void createAndStartProcessBatched() throws Exception {
  WfRequester cont = new DefaultRequester(workflowService());

  ProcessDefinitionDirectory pdd = null;
  WfProcessMgr pmgr = null;
  try {
      pdd = workflowService().processDefinitionDirectory ();
      pmgr = pdd.processMgr("ut-process", "jut1");
  } finally {
      workflowService().release (pdd);
  }
  MethodInvocationBatch mib = new MethodInvocationBatch();
  mib.addInvocation
      (pmgr, "createProcess", new String[]
    {"de.danet.an.workflow.omgcore.WfRequester"},
       new Object[]{new DefaultRequester(workflowService())});
  mib.addInvocation(-1, "key", null, null, false);
  mib.addInvocation(-2, "start", null, null, false);
  MethodInvocationBatch.Result mir = (MethodInvocationBatch.Result)
      workflowService().executeBatch(mib);
  if (mir.hasExceptions ()) {
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.