Package de.danet.an.workflow.omgcore

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


     * element.
     * @exception Exception if an error occurs
     */
    public void invokeTest9() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT9");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  for (Iterator it = map.keySet().iterator(); it.hasNext();) {
      String name = (String) it.next();
      if (name.equals("result")) {
    String returnResult = (String)map.get(name);
    // check testXSLT.xml for the expected result
View Full Code Here


     * element.
     * @exception Exception if an error occurs
     */
    public void invokeTest10() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT10");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  for (Iterator it = map.keySet().iterator(); it.hasNext();) {
      String name = (String) it.next();
      if (name.equals("result")) {
    String returnResult = (String)map.get(name);
    // check testXSLT.xml for the expected result
View Full Code Here

     * element.
     * @exception Exception if an error occurs
     */
    public void invokeTest11() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT11");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  for (Iterator it = map.keySet().iterator(); it.hasNext();) {
      String name = (String) it.next();
      if (name.equals("result")) {
    String returnResult = (String)map.get(name);
    // check testXSLT.xml for the expected result
View Full Code Here

     * element.
     * @exception Exception if an error occurs
     */
    public void invokeTest12() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT12");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  for (Iterator it = map.keySet().iterator(); it.hasNext();) {
      String name = (String) it.next();
      if (name.equals("complexResult")) {
    SAXEventBufferImpl myBuffer
        = (SAXEventBufferImpl)map.get(name);
View Full Code Here

     * element.
     * @exception Exception if an error occurs
     */
    public void invokeTest13() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT13");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  for (Iterator it = map.keySet().iterator(); it.hasNext();) {
      String name = (String) it.next();
      if (name.equals("complexResult")) {
    SAXEventBufferImpl myBuffer
        = (SAXEventBufferImpl)map.get(name);
View Full Code Here

    /**
     * @exception Exception if an error occurs
     */
    public void invokeTest15() throws Exception {
  ProcessMgr pmgr = pdd.processMgr("st-testXSLT", "testXSLT15");
  WfProcess process = pmgr.createProcess(defaultRequester());
   process.start();
  assertTrue(stateReached(process, "closed.completed"));
   Map map = (Map)process.result();
  Date dt = (Date)map.get("datetime");
  assertTrue
      (dt.equals(XMLUtil.parseXsdDateTime("2005-12-14T14:15:16")));
        Double fv = (Double)map.get("floatval");
        assertTrue(fv.doubleValue() == 2005);
View Full Code Here

     * element.
     * @exception Exception if an error occurs
     */
    public void addressBook() throws Exception {
  ProcessMgr pmgr4 = pdd.processMgr("st-testWSIF", "testWSIF4");
  WfProcess process4 = pmgr4.createProcess(defaultRequester());
   process4.start();
  Thread.sleep(30000);
   Map map = (Map)process4.result();
  for (Iterator it2 = map.keySet().iterator(); it2.hasNext();) {
      String name = (String) it2.next();
      System.out.println("name = " + name);
      if (name.equals("searchresult")) {
    String returnResult = (String)map.get(name);
View Full Code Here

    protected Collection wrapProcesses(Collection performerCollection)
  throws Exception {
  Collection newCollection = new ArrayList();
  Iterator it = performerCollection.iterator();
  while (it.hasNext()) {
      WfProcess process = (WfProcess)it.next();
      newCollection.add(new WrappedProcess(process));
  }
  return newCollection;
    }
View Full Code Here

     * Test initial values of process data.
     * @exception Exception if an error occurs
     */
    public void testData() throws Exception {
  ProcessMgr mgr = defDir.processMgr("SystemTest_full", "full");
  WfProcess proc = mgr.createProcess(requester);
  ProcessData data = proc.processContext();
  assertTrue(((Boolean)data.get("packageBooleanData")).booleanValue());
  assertTrue(((String)data.get("testString")).equals("WfMOpen"));
  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)

  procDir.removeProcess(proc);

  mgr = defDir.processMgr("SystemTest_minimal", "minimal");
  proc = mgr.createProcess(requester);
  assertTrue(proc.processContext().isEmpty());
  procDir.removeProcess(proc);
    }
View Full Code Here

     * Test modification of process data.
     * @exception Exception if an error occurs
     */
    public void modifyData() throws Exception {
  ProcessMgr mgr = defDir.processMgr("SystemTest_full", "full");
  WfProcess proc = mgr.createProcess(requester);
  ProcessData data = proc.processContext();
 
  assertTrue(((Boolean)data.get("packageBooleanData")).booleanValue());
  assertTrue(((String)data.get("testString")).equals("WfMOpen"));
  assertTrue((((String)data.get("packageStringData")) == null));
  assertTrue(((Long)data.get("packageIntegerData")).intValue() == 3);
  data.put("", null);
  // Illegal empty entry
  boolean invalidData = false;
  try {
      proc.setProcessContext(data);
  } catch (InvalidDataException exc) {
      invalidData = true;   
  }
  assertTrue(invalidData);
  data.remove("");
  data.put("teststring", "illegal");
  data.put("packageIntegerData", "5");
  // Misspelled teststring and wrong data type for Integer
  invalidData = false;
  try {
      proc.setProcessContext(data);
  } catch (InvalidDataException exc) {
      invalidData = true;   
  }
  data.remove("teststring");
  Iterator it = data.keySet().iterator();
  // Still wrong data type for Integer
  invalidData = false;
  try {
      proc.setProcessContext(data);
  } catch (InvalidDataException exc) {
      invalidData = true;   
  }
  data.put("packageIntegerData", new Integer("5"));

  proc.setProcessContext(data);
  ProcessDataInfo ctxInfo = mgr.contextSignature();
  // Fetch data to check modifications
  data = proc.processContext();
  assertTrue(((Long)data.get("packageIntegerData")).intValue() == 5);

  procDir.removeProcess(proc);

  mgr = defDir.processMgr("SystemTest_minimal", "minimal");
  proc = mgr.createProcess(requester);
  data = proc.processContext();
  assertTrue(data.isEmpty());
  proc.setProcessContext(data);
  data.put("", null);
  invalidData = false;
  try {
      proc.setProcessContext(data);
  } catch (InvalidDataException exc) {
      invalidData = true;   
  }
  assertTrue(invalidData);
  data.remove("");
  proc.setProcessContext(data);
 
  procDir.removeProcess(proc);
    }
View Full Code Here

TOP

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

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.