Package org.camunda.bpm.engine.impl.util.xml

Examples of org.camunda.bpm.engine.impl.util.xml.Element


    * @param element the parent element of the extension element
   * @param extensionElementName the name of the extension element to find
   * @return the extension element or null if not found
   */
  public static Element findCamundaExtensionElement(Element element, String extensionElementName) {
    Element extensionElements = element.element("extensionElements");
    if(extensionElements != null) {
      return extensionElements.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, extensionElementName);
    } else {
      return null;
    }
  }
View Full Code Here


   * @param element the element to parse
   * @return the input output mapping or null if non defined
   * @throws BpmnParseException if a input/output parameter element is malformed
   */
  public static IoMapping parseInputOutput(Element element) {
    Element inputOutputElement = element.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "inputOutput");
    if(inputOutputElement != null) {
      IoMapping ioMapping = new IoMapping();
      parseCamundaInputParameters(inputOutputElement, ioMapping);
      parseCamundaOutputParameters(inputOutputElement, ioMapping);
      return ioMapping;
View Full Code Here

    ExpressionManager expressionManager = Context
        .getProcessEngineConfiguration()
        .getExpressionManager();

    Element extensionElement = activityElement.element("extensionElements");
    if (extensionElement != null) {

      // provide support for deprecated form properties
      parseFormProperties(bpmnParse, expressionManager, extensionElement);
View Full Code Here

      parseFormData(bpmnParse, expressionManager, extensionElement);
    }
  }

  protected void parseFormData(BpmnParse bpmnParse, ExpressionManager expressionManager, Element extensionElement) {
    Element formData = extensionElement.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "formData");
    if(formData != null) {
      parseFormFields(formData, bpmnParse, expressionManager);
    }
  }
View Full Code Here

  }

  protected void parseProperties(Element formField, FormFieldHandler formFieldHandler, BpmnParse bpmnParse, ExpressionManager expressionManager) {

    Element propertiesElement = formField.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "properties");

    if(propertiesElement != null) {
      List<Element> propertyElements = propertiesElement.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "property");

      // use linked hash map to preserve item ordering as provided in XML
      Map<String, String> propertyMap = new LinkedHashMap<String, String>();
      for (Element property : propertyElements) {
        String id = property.attribute("id");
View Full Code Here

  }

  protected void parseValidation(Element formField, FormFieldHandler formFieldHandler, BpmnParse bpmnParse, ExpressionManager expressionManager) {

    Element validationElement = formField.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "validation");

    if(validationElement != null) {
      List<Element> constraintElements = validationElement.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "constraint");

      for (Element property : constraintElements) {
         FormFieldValidator validator = Context.getProcessEngineConfiguration()
           .getFormValidators()
           .createValidator(property, bpmnParse, expressionManager);
View Full Code Here

      parsePotentialOwnerResourceAssignment(potentialOwnerElement, taskDefinition);
    }
  }

  protected void parseHumanPerformerResourceAssignment(Element performerElement, TaskDefinition taskDefinition) {
    Element raeElement = performerElement.element(RESOURCE_ASSIGNMENT_EXPR);
    if (raeElement != null) {
      Element feElement = raeElement.element(FORMAL_EXPRESSION);
      if (feElement != null) {
        taskDefinition.setAssigneeExpression(expressionManager.createExpression(feElement.getText()));
      }
    }
  }
View Full Code Here

      }
    }
  }

  protected void parsePotentialOwnerResourceAssignment(Element performerElement, TaskDefinition taskDefinition) {
    Element raeElement = performerElement.element(RESOURCE_ASSIGNMENT_EXPR);
    if (raeElement != null) {
      Element feElement = raeElement.element(FORMAL_EXPRESSION);
      if (feElement != null) {
        List<String> assignmentExpressions = parseCommaSeparatedList(feElement.getText());
        for (String assignmentExpression : assignmentExpressions) {
          assignmentExpression = assignmentExpression.trim();
          if (assignmentExpression.startsWith(USER_PREFIX)) {
            String userAssignementId = getAssignmentId(assignmentExpression, USER_PREFIX);
            taskDefinition.addCandidateUserIdExpression(expressionManager.createExpression(userAssignementId));
View Full Code Here

    }
    return result;
  }

  protected void parseTaskListeners(Element userTaskElement, TaskDefinition taskDefinition) {
    Element extentionsElement = userTaskElement.element("extensionElements");
    if (extentionsElement != null) {
      List<Element> taskListenerElements = extentionsElement.elementsNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "taskListener");
      for (Element taskListenerElement : taskListenerElements) {
        String eventName = taskListenerElement.attribute("event");
        if (eventName != null) {
          if (TaskListener.EVENTNAME_CREATE.equals(eventName) || TaskListener.EVENTNAME_ASSIGNMENT.equals(eventName)
                  || TaskListener.EVENTNAME_COMPLETE.equals(eventName) || TaskListener.EVENTNAME_DELETE.equals(eventName)) {
View Full Code Here

    TaskListener taskListener = null;

    String className = taskListenerElement.attribute("class");
    String expression = taskListenerElement.attribute("expression");
    String delegateExpression = taskListenerElement.attribute("delegateExpression");
    Element scriptElement = taskListenerElement.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, "script");

    if (className != null) {
      taskListener = new ClassDelegateTaskListener(className, parseFieldDeclarations(taskListenerElement));
    } else if (expression != null) {
      taskListener = new ExpressionTaskListener(expressionManager.createExpression(expression));
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.util.xml.Element

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.