Search in sources :

Example 1 with InputParameter

use of org.camunda.bpm.engine.impl.core.variable.mapping.InputParameter in project camunda-bpm-platform by camunda.

the class BpmnParseUtil method parseInputParameterElement.

/**
 * Parses a input parameter and adds it to the {@link IoMapping}.
 *
 * @param inputParameterElement the input parameter element
 * @param ioMapping the mapping to add the element
 * @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
    ioMapping.addInputParameter(new InputParameter(nameAttribute, valueProvider));
}
Also used : BpmnParseException(org.camunda.bpm.engine.BpmnParseException) ParameterValueProvider(org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider) InputParameter(org.camunda.bpm.engine.impl.core.variable.mapping.InputParameter)

Aggregations

BpmnParseException (org.camunda.bpm.engine.BpmnParseException)1 InputParameter (org.camunda.bpm.engine.impl.core.variable.mapping.InputParameter)1 ParameterValueProvider (org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider)1