Examples of WfActivity


Examples of de.danet.an.workflow.omgcore.WfActivity

        Iterator sa = proc.activitiesInState
      ("open.not_running.suspended").iterator();
        if (!sa.hasNext ()) {
      proc.terminate();
        } else {
      WfActivity act = (WfActivity)sa.next ();
      act.abort();
        }
        if (!waitForState (proc, "closed")) {
      System.out.println ("Cannot terminate " + proc);
      return;
        }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

  assertTrue(process.state().equals("open.not_running.not_started"));
  // start the process
  process.start();
  Thread.sleep (1000);
  assertTrue(process.state().startsWith("open.running"));
  WfActivity act = actByName(process, "Account Antrag erstellen");
  assertTrue(invoke(act));
  act = actByName(process, "Account Antrag bearbeiten");
  assertTrue(invoke(act));
  Thread.sleep (1500);
  assertTrue(actByName(process, "Account Antrag r�ckmelden").state()
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

       .startsWith("closed.completed"));
  assertTrue(process.state().startsWith("closed.completed"));
    }

    private WfActivity actByName(WfProcess proc, String name) throws Exception {
  WfActivity a = null;
  for (Iterator it = proc.steps().iterator(); it.hasNext(); ) {
      WfActivity ai = (WfActivity)it.next();
      if (ai.name().equals (name)) {
    a = ai;
    break;
      }
  }
  return a;
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

  // wait some time because of asynchronous processing
  Thread.sleep(5000);

  // get first activity started automatically
  WfActivity a = actByName (process, "A21");
  // check audit event(s) of first activity
  Collection activityEvents = a.history();
  //displayAuditEvents(activityEvents);
  checkAuditEventsForActivity21(activityEvents);

  // get second activity not started automatically
  a = actByName (process, "A22");
  // check audit event(s) of second activity
  activityEvents = a.history();
  //displayAuditEvents(activityEvents);
  checkAuditEventsForActivityA22(activityEvents);

  // check audit event(s) of process
  Collection processEvents = process.history();
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

  assertTrue(process != null);
  process.start ();
  assertTrue (stateReached (process, "closed"));
  int hs = process.history().size ();
  for (Iterator i = process.steps().iterator(); i.hasNext ();) {
      WfActivity act = (WfActivity)i.next();
      hs += act.history().size();
  }
  assertTrue ("History size should be 4, is " + hs, hs == 4);
    }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

  assertTrue(process != null);
  process.start ();
  assertTrue (stateReached (process, "closed"));
  int hs = process.history().size ();
  for (Iterator i = process.steps().iterator(); i.hasNext ();) {
      WfActivity act = (WfActivity)i.next();
      hs += act.history().size();
  }
  assertTrue (hs == 1);
    }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

    /* ********************************************************************* */
    /* HELPER methods                                                        */
    /* ********************************************************************* */

    private WfActivity actByName(WfProcess proc, String name) throws Exception {
  WfActivity a = null;
  for (Iterator it = proc.steps().iterator(); it.hasNext(); ) {
      WfActivity ai = (WfActivity)it.next();
      if (ai.name().equals (name)) {
    a = ai;
    break;
      }
  }
  return a;
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

                    }
                }
                if (eventSelection.equals("allEvents")) {
                    for (Iterator i = process().steps().iterator();
                         i.hasNext();) {
                        WfActivity act = (WfActivity)i.next();
                        for (Iterator j = act.history().iterator();
                            j.hasNext();) {
                            WfAuditEvent evt = (WfAuditEvent)j.next();
                            evtList.add(new EventWrapper(evt));                           
                        }
                    }
                } else if (!eventSelection.equals("processEvents")) {
                    try {
                        WfActivity act=process().activityByKey(eventSelection);
                        for (Iterator j = act.history().iterator();
                            j.hasNext();) {
                            WfAuditEvent evt = (WfAuditEvent)j.next();
                            evtList.add(new EventWrapper(evt));                           
                        }
                    } catch (InvalidKeyException e) {
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

    public Map getEventSelectionItems () throws RemoteException {
        Map res = new TreeMap ();
        res.put ("", "processEvents");
        res.put("*", "allEvents");
        for (Iterator i = process().steps().iterator(); i.hasNext();) {
            WfActivity act = (WfActivity)i.next();
            res.put(act.key() + " | " + act.name(), act.key());
        }
        return res;
    }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfActivity

      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_sender");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      WfActivity sleepAct = null;
      for (Iterator i = process.steps().iterator(); i.hasNext();) {
    sleepAct = (WfActivity)i.next ();
    if (sleepAct.name().equals("Wait")) {
        break;
    }
      }
      process.start();
      assertTrue (stateReached (sleepAct, "open.running"));
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.