Search in sources :

Example 1 with OutputParameter

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

the class BpmnParseUtil method parseOutputParameterElement.

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

Aggregations

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