Package de.danet.an.workflow.omgcore

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


    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
            boolean found = false;
            for (Iterator i = process.steps().iterator(); i.hasNext();) {
                WfActivity act = (WfActivity)i.next ();
                if (act.name().equals("Generic")) {
                    found = true;
                    assertTrue (act.state().startsWith("closed.completed"));
                }
            }
            assertTrue (found);
      procDir.removeProcess(process);
  } finally {
View Full Code Here


    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      for (Iterator i = process.activitiesInState("closed").iterator ();
     i.hasNext ();) {
    WfActivity act = (Activity)i.next ();
    if (act.name().equals ("Run JS")) {
        assertTrue (act.state().equals
        ("closed.completed.abandoned"));
    } else if (act.name().equals ("Handle Exception")) {
        assertTrue (act.state().equals
        ("closed.completed.normal"));
    } else {
        assertTrue (act.name (), false);
    }
      }
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
View Full Code Here

      ProcessMgr pmgr = procDefDir
    .processMgr ("simpleApplDirTests", "test1");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
            WfActivity act = null;
      for (Iterator i = process.steps().iterator(); i.hasNext();) {
          act = (WfActivity)i.next ();
          if (act.name().equals("invokeTool")) {
                    break;
          }
      }
      assertTrue (act != null);
            assertTrue (stateReached(act, "open.running"));
            Thread.sleep(1000);

            assertTrue (ad.infosByApplication("unittests.Test1").size() == 1);
            Collection infos
                = ad.infosByKey("unittests.Test1", "ToolTest");
            assertTrue (infos.size() == 1);
            SimpleApplicationInfo info
                = (SimpleApplicationInfo)infos.iterator().next();
            assertTrue (info.state() instanceof Object[]);
            WfActivity actFound = workflowService.processDirectory()
                .lookupActivity(info.activityUniqueKey());
            actFound.complete ();
            ad.removeInstance(info.id());
           
            assertTrue (stateReached (process, "closed.completed"));
      procDir.removeProcess(process);
  } finally {
View Full Code Here

    protected Collection wrapActivities(Collection activityCollection)
  throws Exception {
  Collection newCollection = new ArrayList();
  Iterator it = activityCollection.iterator();
  while (it.hasNext()) {
      WfActivity activity = (WfActivity)it.next();
      newCollection.add(new WrappedActivity(activity));
  }
  return newCollection;
    }
View Full Code Here

  assertTrue((((String)data.get("packageStringData")) == null));
  assertTrue(((Long)data.get("packageIntegerData")).intValue() == 3);

  // Test access to context info via activity
  assertTrue(proc.steps().size() > 0);
  WfActivity act = (WfActivity)proc.steps().toArray()[0];
  data = act.processContext();
  assertTrue(((Boolean)data.get("packageBooleanData")).booleanValue());
  assertTrue(((String)data.get("testString")).equals("WfMOpen"));
  assertTrue((((String)data.get("packageStringData")) == null)
       || (((String)data.get("packageStringData")).equals("")));
  assertTrue(((Long)data.get("packageIntegerData")).intValue() == 3)
View Full Code Here

    protected Collection makeSmart(Collection activityCollection)
  throws Exception {
  Collection newCollection = new ArrayList();
  Iterator it = activityCollection.iterator();
  while (it.hasNext()) {
      WfActivity activity = (WfActivity)it.next();
      newCollection.add(new SmartWfActivity(activity,
              setStateDirectly));
  }
  return newCollection;
    }
View Full Code Here

  //wait to shutdown the processing instance
  Util.sleep(30000);
  // Test access to context info via activity
  assertTrue(proc.steps().size() > 0);
  WfActivity act = (WfActivity)proc.steps().toArray()[0];
  data = act.processContext();
  assertTrue(((Boolean)data.get("packageBooleanData")).booleanValue());
  assertTrue(((String)data.get("testString")).equals("WfMOpen"));
  assertTrue((((String)data.get("packageStringData")) == null)
       || (((String)data.get("packageStringData")).equals("")));
  assertTrue(((Long)data.get("packageIntegerData")).intValue() == 3)
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.omgcore.WfActivity

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.