use of org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping in project camunda-bpm-platform by camunda.
the class BpmnParseUtil method parseInputOutput.
/**
* Returns the {@link IoMapping} of an element.
*
* @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(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "inputOutput");
if (inputOutputElement != null) {
IoMapping ioMapping = new IoMapping();
parseCamundaInputParameters(inputOutputElement, ioMapping);
parseCamundaOutputParameters(inputOutputElement, ioMapping);
return ioMapping;
}
return null;
}
use of org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping in project camunda-bpm-platform by camunda.
the class ConnectorParseListener method parseServiceTask.
@Override
public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
Element connectorDefinition = findCamundaExtensionElement(serviceTaskElement, "connector");
if (connectorDefinition != null) {
Element connectorIdElement = connectorDefinition.element("connectorId");
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));
}
}
Aggregations