Package de.danet.an.workflow.api

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


  }
  String duplicate = findDuplicate(processIds);
  if (duplicate != null) {
      faultless = false;
      String[] errdatas = {duplicate};
      eh.add (new PrioritizedMessage
    (PrioritizedMessage.Priority.ERROR,
     bundleBase + "#procdef.process.ununique", errdatas));
  }
  return faultless;
    }
View Full Code Here


                    = {((ExternalReference)type).location().getPath()};
                try {
                    Class jType = XPDLUtil.getJavaType ((ExternalReference)type);
                    if (!(jType.isInterface()
                          || Serializable.class.isAssignableFrom(jType))) {
                        eh.add (new PrioritizedMessage
                            (PrioritizedMessage.Priority.ERROR, bundleBase
                             + "#procdef.data.notSerializable", errdatas));
                    }
                } catch (ClassNotFoundException ee) {
                    eh.add (new PrioritizedMessage
                            (PrioritizedMessage.Priority.ERROR, bundleBase
                             + "#procdef.data.invalidJavaType", errdatas));
                }
            }
        }
View Full Code Here

      if (acts.size() == 0) {
    // empty activity set
    String actSetId = actSetElem.getAttributeValue("Id");
    String processId = process.getAttributeValue("Id");
    String[] errDatas = {processId, actSetId};
    eh.add (new PrioritizedMessage
      (PrioritizedMessage.Priority.ERROR,
       bundleBase + "#procdef.process.activityset.empty",
       errDatas));
    return;
      } else {
View Full Code Here

    = alltranrefsPath.selectNodes(activity).iterator();
      while(transRefIterator.hasNext()) {
    Element transRefElem = (Element)transRefIterator.next();
    String transRefId = transRefElem.getAttributeValue("Id");
    if (!transitionIds.contains(transRefId)) {
        eh.add (new PrioritizedMessage
          (PrioritizedMessage.Priority.ERROR,
           bundleBase + "#procdef.transitionid.notfound",
           new Object[] {transRefId, processId}));
    }
      }
      validateTranstionRestrictions(process, actSetElem, activity,
            isIncludedInActivitySet, eh);
      validateImplementation(doc, process, activity, eh);
      //validate if the referenced participant defined and unique.
      validatePerformer(processId, activity, participantIdList, eh);
  }
  String duplicate = findDuplicate(activityIds);
  if (duplicate != null) {
      String errorKey = null;
      String activitySetId = null;
      if (isIncludedInActivitySet) {
    errorKey = "procdef.activityset.activity.ununique";
    activitySetId = actSetElem.getAttributeValue("Id");
      } else {
    errorKey = "procdef.activity.ununique";
      }
      String[] errdatas = {duplicate, processId, activitySetId};
      eh.add (new PrioritizedMessage
        (PrioritizedMessage.Priority.ERROR,
         bundleBase + "#" + errorKey, errdatas));
  }
    }             
View Full Code Here

  for (Iterator i = dls.iterator(); i.hasNext();) {
      Element dl = (Element)i.next();
      String exep = dl.getChildText("ExceptionName", namespace);
      if (exep == null || exep.length() == 0) {
    eh.add
        (new PrioritizedMessage
         (PrioritizedMessage.Priority.ERROR,
          bundleBase + "#procdef.activity.deadline.noException",
          new Object[] { processId,
             actEl.getAttributeValue("Id") }));
      }
      String cond = dl.getChildText("DeadlineCondition", namespace);
      if (cond == null || cond.length() == 0) {
    eh.add
        (new PrioritizedMessage
         (PrioritizedMessage.Priority.ERROR,
          bundleBase + "#procdef.activity.deadline.noCondition",
          new Object[] { processId,
             actEl.getAttributeValue("Id") }));
    continue;
View Full Code Here

  if ((actSetElement != null)
      && blockActivityId.equals(actSetElement.getAttributeValue("Id"))) {
      // the given activity included his super activity set as block
      // activity.
      eh.add
    (new PrioritizedMessage
     (PrioritizedMessage.Priority.ERROR,
      bundleBase + "#procdef.activityset.activity.includeitself",
      errdatas));
      return;
  }
  if (activitySetList != null) {
      boolean validActivitySet = false;
      Iterator i = activitySetList.iterator();
      while (i.hasNext()) {
    Element actSet = (Element)i.next();
    if (actSet.getAttributeValue("Id").equals(blockActivityId)) {
        validActivitySet = true;
        break;
    }
      }
      if (!validActivitySet) {
    // included BlockActivity not found in the defined
    // activity set
    eh.add
        (new PrioritizedMessage
         (PrioritizedMessage.Priority.ERROR,
          bundleBase + "#procdef.activity.activityset.invalid",
          errdatas));
    return;
      }
View Full Code Here

     * the format "<code>a.resource.bundle.base.name#key</code>", then check
     * the return value of the method <code>message()</code>.
     */
    public void message() {
  String testMsg = "test message without key";
  PrioritizedMessage pm = new PrioritizedMessage
      (PrioritizedMessage.Priority.WARN, testMsg);
  assertTrue(pm.message().equals(testMsg));
    }
View Full Code Here

  assertTrue
      (getMessageWithKeyAndObjects(Locale.GERMAN).equals(atestMsg));
    }

    private String getMessageWithKey(Locale locale) {
  PrioritizedMessage pm = new PrioritizedMessage
      (PrioritizedMessage.Priority.ERROR,
       "ImportMessages#procdef.transition.otherwise.notatend");
  String internationizedMsg = pm.message(locale);
  logger.debug("internationized message: " + internationizedMsg);
  return internationizedMsg;
    }
View Full Code Here

  return internationizedMsg;
    }

    private String getMessageWithKeyAndObjects(Locale locale) {
  Object[] objects = {"testProcess"};
  PrioritizedMessage pm = new PrioritizedMessage
      (PrioritizedMessage.Priority.ERROR,
       "ImportMessages#procdef.process.ununique", objects);
  String internationizedMsg = pm.message(locale);
  logger.debug("internationized message: " + internationizedMsg);
  return internationizedMsg;
    }
View Full Code Here

TOP

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

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.