Package de.danet.an.workflow.omgcore

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


        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


        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

            }
            throw (IllegalStateException)
                (new IllegalStateException(e.getMessage())).initCause(e);
        }
        ProcessDataInfo sig = (ProcessDataInfo)mir.result(0);
        ProcessData data = (ProcessData)mir.result(1);
        dataFields = new ArrayList ();
        for (Iterator i = data.entrySet().iterator();
             i.hasNext();) {
            Map.Entry e = (Map.Entry)i.next();
            dataFields.add
                (new DataFieldWrapper
                 (dataFieldAttrs, (String)e.getKey(),
View Full Code Here

    /**
     * Save modified data.
     */
    public void saveData () throws RemoteException {
        ProcessData pd = new DefaultProcessData();
        for (Iterator i = dataFields.iterator(); i.hasNext();) {
            DataFieldWrapper df = (DataFieldWrapper)i.next();
            if (df.isModified()) {
                if (df.isString() || df.isLong() || df.isDouble()
                    || df.isBoolean() || df.isDate() || df.isXml()) {
                    pd.put(df.getName(), df.getValue());
                }
            }
        }
        try {
            process().setProcessContext(pd);
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

      Process process = (Process)createProcess("N1", "N2", cont);
      process.start();
      Thread.sleep(5000);

      // get processdata
      ProcessData data = process.processContext();
      Object value = data.get("result");
      if (value != null) {
    SAXEventBufferImpl myBuffer
        = (SAXEventBufferImpl)value;
    TransformerFactory tf
        = TransformerFactory.newInstance();
View Full Code Here

    public void verifyInit() throws Exception {
  Basic.importProcessDefinitions("/process/testXPDL.xml");
  WfRequester req = new DefaultRequester(workflowService());
  // create the process
  WfProcess process = createProcess("ut-process", "jut1", req);
  ProcessData procData = process.processContext ();
  assertTrue (procData.containsKey("testValue"));
  assertTrue (procData.get("testValue").equals ("42"));
    }
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);
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.omgcore.ProcessData

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.