Package de.danet.an.workflow.omgcore

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


            ProcessDefinitionDirectory pdd = null;
            try {
                pdd = wsc.getWorkflowService().processDefinitionDirectory();
                String[] ids = managerNameFilter.split("/");
                ProcessMgr mgr = pdd.processMgr(ids[0], ids[1]);
                ProcessDataInfo pdi = mgr.contextSignature();
                contextVariables = new ArrayList ();
                contextVariables.add(new SelectItem (""));
                for (Iterator i = pdi.entrySet().iterator(); i.hasNext();) {
                    Map.Entry e = (Map.Entry)i.next();
                    if (e.getValue().equals(String.class)) {
                        contextVariables.add (new SelectItem (e.getKey()));
                    }
                }
View Full Code Here


    public void typeInformation() throws Exception {
  ProcessDefinitionDirectory procDir = null;
  try {
      procDir = workflowService.processDefinitionDirectory();
      ProcessMgr pmgr = procDir.processMgr("typestest", "typestest1");
      ProcessDataInfo pdi = pmgr.contextSignature();
      assertTrue (pdi.get("XMLField") instanceof SAXEventBuffer);
      assertTrue (pdi.get("XMLField2") instanceof ExternalReference);
      assertTrue (((ExternalReference)pdi.get("XMLField2"))
      .location().toString()
      .equals ("http://somwhere.unknown"));
      assertTrue (pdi.get("XMLField3").equals(org.w3c.dom.Element.class));
  } finally {
      workflowService.release (procDir);
  }
    }
View Full Code Here

     */
    public void contextSignature() throws Exception {
  Basic.importProcessDefinitions("/procdef/initialProcesses.xml");
  // create the process
  ProcessMgr processMgr = getProcessMgr("ut-procdef", "jut1");
  ProcessDataInfo procDataInfo = processMgr.contextSignature ();
  assertTrue (procDataInfo.containsKey("packageTestValue1"));
  assertTrue (procDataInfo.get("packageTestValue1")
        .equals (java.lang.String.class));
  assertTrue (procDataInfo.containsKey("packageTestValue2"));
  assertTrue (procDataInfo.get("packageTestValue2")
        .equals (java.lang.Double.class));
  assertTrue (procDataInfo.containsKey("processTestValue1"));
  assertTrue (procDataInfo.get("processTestValue1")
        .equals (java.lang.Long.class));
  assertTrue (procDataInfo.containsKey("processTestValue2"));
  assertTrue (procDataInfo.get("processTestValue2")
        .equals (java.util.Date.class));
  assertTrue (procDataInfo.containsKey("processTestValue3"));
  assertTrue (procDataInfo.get("processTestValue3")
        .equals (java.lang.Boolean.class));
    }
View Full Code Here

                throw (RemoteException)e;
            }
            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(),
                  sig.get(e.getKey()), e.getValue()));
        }
    }
View Full Code Here

  ProcessDefinition pd
      = pdd.lookupProcessDefinition("ut-procdef", "called1");
  assertTrue (pd != null);
  assertTrue (pd.processHeader().created().equals ("07.04.2003"));
  assertTrue (pd.processHeader().description().equals ("Was tun"));
  ProcessDataInfo pdi = pd.resultSignature();
  assertTrue (pdi.keySet().size () == 1);
  assertTrue (pdi.containsKey("status"));
  assertTrue (pdi.get("status") == String.class);
    }
View Full Code Here

        throws RemoteException, SOAPException, ResultNotAvailableException {
        SOAPElement resultData
            = propsNode.addChildElement("ResultData", Consts.ASAP_PREFIX);
       
        ProcessDefinition procdef = proc.processDefinition();
        ProcessDataInfo resultSignature = procdef.resultSignature();

        resultData.addNamespaceDeclaration
            (Consts.RS_PREFIX, getResourceReference().getNamespace());
       
        ProcessData result;
        result = proc.result();
       
        Iterator iterator = resultSignature.keySet().iterator();
        while (iterator.hasNext()) {
            String name = (String) iterator.next();
            Object value = result.get(name);
            SOAPElement dataNode
                = resultData.addChildElement(name, Consts.RS_PREFIX);
View Full Code Here

     * @throws ParseException
     */
    private ProcessData getProcessData(ProcessDefinition procdef,
            SOAPElement contextData)
        throws RemoteException, SOAPException, ParseException {
        ProcessDataInfo info = procdef.contextSignature();
        ProcessData procData = new DefaultProcessData();
       
        for (Iterator pdi = contextData.getChildElements(); pdi.hasNext();) {
            SOAPElement current = (SOAPElement) pdi.next();
            String pdname = current.getLocalName();
            Object type = info.get(pdname);
            if (type == null) {
                throw new SOAPException("process does not contain a variable "
                                + "with name " + pdname);
            }
            String pdvalue = XMLUtil.getFirstLevelTextContent(current);
View Full Code Here

     * @exception Exception if an error occurs
     */
    public void testInfo() throws Exception {
  ProcessMgr mgr = defDir.processMgr("SystemTest_full", "full");
  // Test context signature
  ProcessDataInfo ctxInfo = mgr.contextSignature();
  assertTrue(((Class)ctxInfo.get("packageBooleanData"))
       .isAssignableFrom(Boolean.class));
  assertTrue(((Class)ctxInfo.get("testString"))
       .isAssignableFrom(String.class));
  assertTrue(((Class)ctxInfo.get("packageIntegerData"))
       .isAssignableFrom(Long.class));
  assertTrue(((Class)ctxInfo.get("packageIntegerData"))
       .isAssignableFrom(Long.class));
  assertTrue(((Class)ctxInfo.get("packageStringData"))
       .isAssignableFrom(String.class));

  // Test result signature (all OUT or INOUT parameters)
  Iterator res = mgr.resultSignature().values().iterator();
  ProcessDataInfo resInfo = mgr.resultSignature();
  assertTrue(((Class)resInfo.get("PARAM-InOut-String"))
       .isAssignableFrom(String.class));
  assertTrue(((Class)resInfo.get("PARAM-Out-Integer"))
       .isAssignableFrom(Long.class));

  mgr = defDir.processMgr("SystemTest_minimal", "minimal");
  assertTrue(mgr.contextSignature().isEmpty());
  assertTrue(mgr.resultSignature().isEmpty());
View Full Code Here

      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);
View Full Code Here

     */
    public void testInfo() throws Exception {
  Util.logEntry("testInfo");
  ProcessMgr mgr = defDir.processMgr("SystemTest_full", "full");
  // Test context signature
  ProcessDataInfo ctxInfo = mgr.contextSignature();
  assertTrue(((Class)ctxInfo.get("packageBooleanData"))
       .isAssignableFrom(Boolean.class));
  assertTrue(((Class)ctxInfo.get("testString"))
       .isAssignableFrom(String.class));
  assertTrue(((Class)ctxInfo.get("packageIntegerData"))
       .isAssignableFrom(Long.class));
  assertTrue(((Class)ctxInfo.get("packageIntegerData"))
       .isAssignableFrom(Long.class));
  assertTrue(((Class)ctxInfo.get("packageStringData"))
       .isAssignableFrom(String.class));
  //wait to shutdown the processing instance
  Util.sleep(30000);

  // Test result signature (all OUT or INOUT parameters)
  Iterator res = mgr.resultSignature().values().iterator();
  ProcessDataInfo resInfo = mgr.resultSignature();
  assertTrue(((Class)resInfo.get("PARAM-InOut-String"))
       .isAssignableFrom(String.class));
  assertTrue(((Class)resInfo.get("PARAM-Out-Integer"))
       .isAssignableFrom(Long.class));

  mgr = defDir.processMgr("SystemTest_minimal", "minimal");
  //wait to shutdown the processing instance
  Util.sleep(30000);
View Full Code Here

TOP

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

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.