} else {
MessageDefinition inMessage = this.messages.get(inMessageRef);
String id = operationElement.attribute("id");
String name = operationElement.attribute("name");
String implementationRef = this.resolveName(operationElement.attribute("implementationRef"));
Operation operation = new Operation(this.targetNamespace + ":" + id, name, bpmnInterface, inMessage);
operation.setImplementation(this.operationImplementations.get(implementationRef));
Element outMessageRefElement = operationElement.element("outMessageRef");
if (outMessageRefElement != null) {
String outMessageRef = this.resolveName(outMessageRefElement.getText());
if (this.messages.containsKey(outMessageRef)) {
MessageDefinition outMessage = this.messages.get(outMessageRef);
operation.setOutMessage(outMessage);
}
}
operations.put(operation.getId(), operation);
return operation;
}
}