Examples of WfProcess


Examples of de.danet.an.workflow.ejbs.core.WfProcess

                }
            }
        });
        Iterator iter = refList.iterator();
        iter.next();
        WfProcess p = (WfProcess)iter.next();
        String o1 = p.key();
        iter.remove();
        iter.next();
        p = (WfProcess)iter.next();
        String o2 = p.key();
        iter.remove();
        FilterCriterion filter = new AndOperation
            (new NotOperation(new PropertyEquality("key", o1)),
             new NotOperation(new PropertyEquality("key", o2)));
        RangeAccess ra = pdir.processes(filter, new DescendingOrder("key"));
        List procs = ra.items(0, 10);
        Iterator i1 = refList.iterator();
        Iterator i2 = procs.iterator();
        for (int i = 0; i < 11; i++) {
            WfProcess p1 = (WfProcess)i1.next();
            WfProcess p2 = (WfProcess)i2.next();
            assertTrue (p1.key().equals(p2.key()));
        }
        procs = ra.items(11, 15);
        i2 = procs.iterator();
        for (int i = 0; i < 4; i++) {
            WfProcess p1 = (WfProcess)i1.next();
            WfProcess p2 = (WfProcess)i2.next();
            assertTrue (p1.key().equals(p2.key()));
        }
    }
View Full Code Here

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

     *
     */
    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
  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()
       .startsWith("closed.completed"));
  assertTrue(process.state().startsWith("closed.completed"));
    }
View Full Code Here

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

    /* Comment copied from interface. */
    public boolean isMemberOfPerformers(WfProcess wfProcess)
  throws RemoteException {
  for (Iterator ps = performers().iterator(); ps.hasNext();) {
      WfProcess p = (WfProcess)ps.next();
      if (p.key().equals (wfProcess.key())) {
    return true;
      }
  }
  return false;
    }
View Full Code Here

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

  if (mir.hasExceptions ()) {
      Exception e = mir.firstException ();
      assertTrue ("Problem executing batch: " + e.getMessage(), false);
  }
  Object[] results = mir.results();
  WfProcess proc = (WfProcess)results[0];
  assertTrue (proc.key().equals (results[1]));
    }
View Full Code Here

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

    /**
     * Create a new process for the given type.
     */
    public void createProcess2() 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();
  Thread.sleep (1000);
  assertTrue(process.state().startsWith("open.running"));
  int i = 9;
  int resCnt = 0;
  while (i-- > 0) {
      boolean resd = false;
      for (Iterator it = process.steps().iterator(); it.hasNext();) {
    WfActivity a = (WfActivity)it.next();
    if (a.state().startsWith ("open.not_running.suspended")) {
        a.resume ();
        resd = true;
        resCnt += 1;
View Full Code Here

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

    /**
     * Create a new process for the given type.
     */
    public void createProcess3() 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 (5000);
  assertTrue("Process state should be closed.completed.normal, is "
       + process.state(),
       process.state().startsWith("closed.completed.normal"));
  assertTrue("Process workflow state should be closed, is "
       + process.workflowState(),
       process.workflowState().equals (State.CLOSED));
    }
View Full Code Here

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

    /**
     * Remove a given process from the database.
     */
    public void removeProcess3() throws Exception {
  WfRequester cont = new DefaultRequester(workflowService());
  WfProcess process = createProcess("ut-process", "jut999", cont);
  ProcessDirectory pd = null;
  try {
      pd = workflowService().processDirectory ();
      pd.removeProcess ((Process)process);
  } finally {
View Full Code Here

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

  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      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"));
      Map pd = chan.receiveMessage();
      assertTrue ("Hello world!".equals(pd.get("message")));
      assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
View Full Code Here

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

  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_receiver");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      WfActivity recAct = null;
      for (Iterator i = process.steps().iterator(); i.hasNext();) {
    recAct = (WfActivity)i.next ();
    if (recAct.name().equals("Receive")) {
        break;
    }
      }
      assertTrue (recAct != null);
      process.start();
      assertTrue (stateReached (recAct, "open.running"));
      Thread.sleep (500);
      Map pd = new HashMap ();
      pd.put ("message", "Hello world!");
      chan.sendMessage(pd);
      assertTrue (stateReached (recAct, "closed.completed"));
      pd = process.processContext();
      assertTrue ("Hello world!".equals(pd.get("lastMessage")));
      assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
            workflowService.release(chan);
View Full Code Here

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

  try {
      procDefDir = workflowService.processDefinitionDirectory();
      procDir = workflowService.processDirectory();
      ProcessMgr pmgr = procDefDir.processMgr
    ("chabacc", "chabacc_test_receiver");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      chan = workflowService.getChannel(process, "test_channel");
      Map pd = new HashMap ();
      pd.put ("message", "Hello world!");
      chan.sendMessage(pd);
      Thread.sleep (500);
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      pd = process.processContext();
      assertTrue ("Hello world!".equals(pd.get("lastMessage")));
      procDir.removeProcess(process);
  } finally {
            workflowService.release(chan);
      workflowService.release (procDefDir);
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.