Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.BpmnParseException


   * @throws BpmnParseException if the input parameter element is malformed
   */
  public static void parseInputParameterElement(Element inputParameterElement, IoMapping ioMapping) {
    String nameAttribute = inputParameterElement.attribute("name");
    if(nameAttribute == null || nameAttribute.isEmpty()) {
      throw new BpmnParseException("Missing attribute 'name' for inputParameter", inputParameterElement);
    }

    ParameterValueProvider valueProvider = parseNestedParamValueProvider(inputParameterElement);

    // add parameter
View Full Code Here


   * @throws BpmnParseException if the output parameter element is malformed
   */
  public static void parseOutputParameterElement(Element outputParameterElement, IoMapping ioMapping) {
    String nameAttribute = outputParameterElement.attribute("name");
    if(nameAttribute == null || nameAttribute.isEmpty()) {
      throw new BpmnParseException("Missing attribute 'name' for outputParameter", outputParameterElement);
    }

    ParameterValueProvider valueProvider = parseNestedParamValueProvider(outputParameterElement);

    // add parameter
View Full Code Here

    } else if(element.elements().size() == 1) {
      return parseParamValueProvider(element.elements().get(0));

    } else {
      throw new BpmnParseException("Nested parameter can at most have one child element", element);
    }
  }
View Full Code Here

      TreeMap<String, ParameterValueProvider> providerMap = new TreeMap<String, ParameterValueProvider>();
      for (Element entryElement : parameterElement.elements("entry")) {
        // entry must provide key
        String keyAttribute = entryElement.attribute("key");
        if(keyAttribute == null || keyAttribute.isEmpty()) {
          throw new BpmnParseException("Missing attribute 'key' for 'entry' element", entryElement);
        }
        // parse nested provider
        providerMap.put(keyAttribute, parseNestedParamValueProvider(entryElement));
      }
      return new MapValueProvider(providerMap);
View Full Code Here

   * @throws BpmnParseException if the a attribute is missing or the script cannot be processed
   */
  public static ExecutableScript parseCamundaScript(Element scriptElement) {
    String scriptLanguage = scriptElement.attribute("scriptFormat");
    if (scriptLanguage == null || scriptLanguage.isEmpty()) {
      throw new BpmnParseException("Missing attribute 'scriptFormatAttribute' for 'script' element", scriptElement);
    }
    else {
      String scriptResource = scriptElement.attribute("resource");
      String scriptSource = scriptElement.getText();
      try {
        return ScriptUtil.getScript(scriptLanguage, scriptSource, scriptResource, getExpressionManager());
      }
      catch (ProcessEngineException e) {
        throw new BpmnParseException("Unable to process script", scriptElement, e);
      }
    }
  }
View Full Code Here

      String connectorId = null;
      if (connectorIdElement != null)  {
        connectorId = connectorIdElement.getText().trim();
      }
      if (connectorIdElement == null || connectorId.isEmpty()) {
        throw new BpmnParseException("No 'id' defined for connector.", connectorDefinition);
      }

      IoMapping ioMapping = parseInputOutput(connectorDefinition);
      activity.setActivityBehavior(new ServiceTaskConnectorActivityBehavior(connectorId, ioMapping));
    }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.BpmnParseException

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.