Package de.danet.an.workflow.omgcore

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


      act = toolAgentContext().lookupActivity(auk);
  } catch (InvalidKeyException e) {
      logger.warn (auk + " is unknown, cannot cancel wait tool.");
      return;
  }
  ProcessData res = new DefaultProcessData ();
  String resParam = (String)((Object[])info.state())[1];
  res.put (resParam, "CANCELED");
  try {
      act.setResult (res);
      act.complete ();
      if (logger.isDebugEnabled ()) {
    logger.debug ("Timer application " + applId + " canceled, "
View Full Code Here


  return a;
    }

    private boolean invoke(WfActivity a) throws Exception {
  assertTrue(a.state() != null);
  ProcessData processData = a.processContext();
  // Check data field has been read correctly.
  processData.containsKey("emailAddress");
  processData.containsValue("account@bank.com");
  a.complete();
  Thread.sleep (1000);
  return true;
    }
View Full Code Here

  assertTrue(dae.activityName() == null);
  assertTrue(dae.processMgrName().equals("ut-procdef-audit/auditTest"));
  assertTrue(dae.processMgrVersion().equals("1.42"));

  assertTrue(dae.oldData().isEmpty());
  ProcessData newData = dae.newData();
  assertTrue("Size should be 3, is " + newData.size(),
       newData.size()==3);
  assertTrue(newData.keySet().contains("status"));
  String data = (String)(newData.get("status"));
  assertTrue(data == null);
  assertTrue(newData.keySet().contains("testData"));
  data = (String)(newData.get("testData"));
  assertTrue(data.equals("relevante Process Test Daten"));
  assertTrue(newData.keySet().contains("emailAddress"));
  data = (String)(newData.get("emailAddress"));
  assertTrue(data.equals("account@bank.com"));
    }
View Full Code Here

  assertTrue(dae.activityName().equals("A21"));
  assertTrue(dae.processMgrName().equals("ut-procdef-audit/auditTest"));
  assertTrue(dae.processMgrVersion().equals("1.42"));

  assertTrue(dae.oldData().isEmpty());
  ProcessData newData = dae.newData();
  assertTrue(newData.size()==1);
  Iterator j = newData.keySet().iterator();
  j.hasNext();
  String key = (String)j.next();
  assertTrue(key.equals("statusOut"));
  String data = (String)(newData.get(key));
  assertTrue(data.equals("Sent to: account@bank.com"));

  // the third event is required to signal a state change
  o = stateEvent;
  assertTrue(o instanceof WfStateAuditEvent);
View Full Code Here

  assertTrue(dae2.activityKey() == null);
  assertTrue(dae2.activityName() == null);
  assertTrue(dae2.processMgrName().equals("ut-procdef-audit/auditTest"));
  assertTrue(dae2.processMgrVersion().equals("1.42"));

  ProcessData oldData = dae2.oldData();
  assertTrue(oldData.size()==1);
  Iterator j = oldData.keySet().iterator();
  j.hasNext();
  String key = (String)j.next();
  assertTrue(key.equals("status"));
  String data = (String)(oldData.get(key));
  assertTrue(data == null);

  ProcessData newData = dae2.newData();
  assertTrue(newData.size()==1);
  Iterator k = newData.keySet().iterator();
  k.hasNext();
  key = (String)k.next();
  assertTrue(key.equals("status"));
  data = (String)(newData.get(key));
  assertTrue(data.equals("Sent to: account@bank.com"));
    }
View Full Code Here

    && ((WfStateAuditEvent)e).newState().startsWith ("closed")) {
    break;
      }
  }
        assertTrue (e instanceof ProcessClosedAuditEvent);
        ProcessData res = ((ProcessClosedAuditEvent)e).result();
        assertTrue (res.keySet().size() == 2);
        assertTrue (res.keySet().contains("outVal1"));
        assertTrue (res.keySet().contains("inOutVal1"));
  assertTrue (subs.receive(2500) == null);
  workflowService().release (subs);
    }
View Full Code Here

            if (logger.isDebugEnabled()) {
                logger.debug ("Setting data changes for " + event);
            }
            List changes = new ArrayList ();
            Set items = new TreeSet();
            ProcessData oldData = ((WfDataAuditEvent)event).oldData();
            ProcessData newData = ((WfDataAuditEvent)event).newData();
            items.addAll (oldData.keySet());
            items.addAll (newData.keySet());
            for (Iterator i = items.iterator(); i.hasNext(); ) {
                String item = (String)i.next();
                changes.add (new ContextChangeWrapper
                             (item, oldData.get(item), newData.get(item)));
            }
            FacesContext fc = FacesContext.getCurrentInstance();
            ((ProcessSelection)fc.getExternalContext().getSessionMap()
                .get("processSelection")).setAuditEventDataChangesData(changes);
            return null;
View Full Code Here

    ("chabacc", "chabacc_test_send_self");
      WfProcess process
    = pmgr.createProcess(new DefaultRequester (workflowService));
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      ProcessData pd = process.processContext();
      assertTrue ("Hello world!".equals(pd.get("lastMessage")));
      procDir.removeProcess(process);
  } finally {
      workflowService.release (procDefDir);
      workflowService.release (procDir);
  }
View Full Code Here

  msg.setContent(mimeMulti);
  msg.saveChanges();
  // send the message
  Transport.send(msg);
  // build return value
  ProcessData resData = new DefaultProcessData();
  if (status != null) {
      resData.put (status, "OK");
  }
  return resData;
    }
View Full Code Here

            if (logger.isDebugEnabled ()) {
                logger.debug ("Setting result for " + auk);
            }
            try {
                if (resParam != null) {
                    ProcessData res = new DefaultProcessData ();
                    res.put (resParam, "EXPIRED");
                    act.setResult (res);
                }
                act.complete ();
                if (logger.isDebugEnabled ()) {
                    logger.debug ("Result set for " + auk + " and completed");
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.