Package de.danet.an.workflow.api

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


    }

    private ProcessData assignIssue
  (String issueId, String userName, String assignUserName,
   String attName, String resId) {
  ProcessData data = new DefaultProcessData();
  Vector w  = (Vector)
      (XmlRpcCall.rpc(serverUrl, "scm.assignIssue", new Object[]
    { issueId,userName,assignUserName,attName
    } ));
  for(int i = 0; i < w.size();i++){
      data.put(resId, w.elementAt(i));
      logger.debug ("Result is : " + data);
  }
  return data;     
    }
View Full Code Here


  String dataItemName = null;
  String dataItemValue = null;
        boolean waitForResponse = true;

  // Scan request params and store data values in a map for later use
        ProcessData sendData = new DefaultProcessData();
  for (Enumeration e = request.getParameterNames();
       e.hasMoreElements();) {
      String pn = (String)e.nextElement();
      if (pn.equals("WFM_packageID")) {
    packageID = request.getParameter(pn);
      } else if (pn.equals("WFM_processID")) {
    processID = request.getParameter(pn);
      } else if (pn.equals("WFM_dataItemName")) {
    dataItemName = request.getParameter(pn);
      } else if (pn.equals("WFM_dataItemValue")) {
    dataItemValue = request.getParameter(pn);
            } else if (pn.equals("WFM_waitForResponse")) {
                waitForResponse
                    = (new Boolean (request.getParameter(pn)).booleanValue());
      } else {
    sendData.put(pn, request.getParameter(pn));
      }
  }

  HttpSession session = request.getSession(true);
  if (logger.isDebugEnabled()) {
View Full Code Here

        resId = formPars[i].id();
        continue;
    }
      }

      ProcessData data = new DefaultProcessData();
      Vector w  = (Vector)
    (XmlRpcCall.rpc(serverUrl, "scm.getIssueType", new Object[]
        { issueId
        } ));
      for(int i = 0; i < w.size(); i++) {
    data.put(resId, w.elementAt(i));
      }
      result.set (data);
  } finally {
      if (logger.isDebugEnabled()) {
    logger.debug ("Finished invocation of " + activity.uniqueKey());
View Full Code Here

  }

  // Create new process
  Channel channel = null;
  try {
      ProcessData sendData = new DefaultProcessData();
      // Create new process
      ProcessLookup pl = lookupProcess
    (null, packageID, processID, sendData, null, null);
     
      // Build connection to process and start process
View Full Code Here

        resId = formPars[i].id();
        continue;
    }
      }

      ProcessData data = new DefaultProcessData();
      Vector w  = (Vector)
    (XmlRpcCall.rpc
     (serverUrl, "scm.getLastModification", new Object[]
         { issueId
         } ));
      String message =" ";
      for(int i = 0; i < w.size();i++) {
    message = message + w.elementAt(i) + " ";
      }
      data.put(resId, message);
      result.set (data);
  } finally {
      if (logger.isDebugEnabled()) {
    logger.debug ("Finished invocation of " + activity.uniqueKey());
      }
View Full Code Here

        resId = formPars[i].id();
        continue;
    }
      }

      ProcessData data = new DefaultProcessData();
      Vector w = (Vector)
    (XmlRpcCall.rpc
     (serverUrl, "scm.getArchiveEmail", new Object[] {
         moduleName
     } ));

      for(int i = 0; i<w.size();i++) {
    data.put(resId,w.elementAt(i));
      }
      result.set (data);
  } finally {
      if (logger.isDebugEnabled()) {
    logger.debug ("Finished invocation of " + activity.uniqueKey());
View Full Code Here

        ("Delivering message " + CollectionsUtil.toString(message)
         + " from channel " + channel
         + " to waiting activity " + act);
      }
      try {
    act.setResult (new DefaultProcessData (message));
    act.complete ();
      } catch (CannotCompleteException e) {
    logger.error
        ("Activity " + act + " listening on channel "
         + "but cannot be completed?!: " + e.getMessage (), e);
View Full Code Here

     */
    protected void mergeResult
  (ProcessLocal process, FormalParameter[] fps, Map result)
  throws InvalidDataException {
  try {
      ProcessData pd = new DefaultProcessData ();
      Set items = new HashSet (result.keySet());
      for (int i = 0; i < fps.length; i++) {
    FormalParameter fp = fps[i];
    if (fp.mode() == FormalParameter.Mode.IN) {
        continue;
    }
    Object actParam = actualParameters()[i];
    if (!result.containsKey(fp.id())) {
        throw new InvalidDataException
      ("Result does not include out parameter \""
       + fp.id() + "\".");
    }
    pd.put (actParam, result.get(fp.id()));
    items.remove (fp.id());
      }
      if (items.size() > 0) {
    Iterator itr = items.iterator();
    throw new InvalidDataException
View Full Code Here

     */
    public void modifyData() throws Exception {
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData pd = new DefaultProcessData ();
  pd.put ("testValue", "modifiedValue");
  process.setProcessContext (pd);
  ProcessData procData = process.processContext ();
  assertTrue (procData.get("testValue").equals ("modifiedValue"));
  boolean caught = false;
  pd.clear ();
  pd.put ("Test key", "42");
  try {
      process.setProcessContext (pd);
  } catch (InvalidDataException inv) {
      caught = true;
  }
View Full Code Here

  WfProcess null1 = pmgr.createProcess(req);
  WfProcess null2 = pmgr.createProcess(req);
  null2.start (); // start one to show it makes no difference

  // Now with value item
  ProcessData pd = new DefaultProcessData ();
  pd.put ("testValue", "Find this");
  WfProcess procThis1 = pmgr.createProcess(req);
  procThis1.setProcessContext (pd);
  WfProcess procThis2 = pmgr.createProcess(req);
  procThis2.setProcessContext (pd);
  WfProcess procThis3 = pmgr.createProcess(req);
  procThis3.setProcessContext (pd);

  pd.put ("testValue", "Find that");
  WfProcess procThat1 = pmgr.createProcess(req);
  procThat1.setProcessContext (pd);
  WfProcess procThat2 = pmgr.createProcess(req);
  procThat2.setProcessContext (pd);

  // very long value item
  String dummyText = "Streng dem definierten Wesen des Blindtextes "
      + "folgend, fungiere ich als solcher und gebe mich unverbindlich "
      + "inhaltsleer. In bedr�ckender Enge in vorgefertigte Masken "
      + "gepresst friste ich ein freudloses Dasein auf dem schmalen "
      + "Grat zwischen Nichtbeachtung und Bedeutungslosigkeit und habe "
      + "doch eine Bitte: Handeln Sie Sinn stiftend f�r meine Existenz "
      + "und lesen Sie mich.";
  pd.put ("testValue", dummyText);
  WfProcess procLong = pmgr.createProcess(req);
  procLong.setProcessContext (pd);

  // Do tests
  Collection c = pmgr.findByDataItem("testValue", null);
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.api.DefaultProcessData

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.