use of org.activiti.engine.impl.bpmn.webservice.MessageDefinition in project Activiti by Activiti.
the class BpmnParse method createMessages.
public void createMessages() {
for (Message messageElement : bpmnModel.getMessages()) {
MessageDefinition messageDefinition = new MessageDefinition(messageElement.getId(), name);
if (StringUtils.isNotEmpty(messageElement.getItemRef())) {
if (this.itemDefinitions.containsKey(messageElement.getItemRef())) {
ItemDefinition itemDefinition = this.itemDefinitions.get(messageElement.getItemRef());
messageDefinition.setItemDefinition(itemDefinition);
}
}
this.messages.put(messageDefinition.getId(), messageDefinition);
}
}
use of org.activiti.engine.impl.bpmn.webservice.MessageDefinition in project Activiti by Activiti.
the class BpmnParse method createOperations.
protected void createOperations() {
for (Interface interfaceObject : bpmnModel.getInterfaces()) {
BpmnInterface bpmnInterface = new BpmnInterface(interfaceObject.getId(), interfaceObject.getName());
bpmnInterface.setImplementation(this.interfaceImplementations.get(interfaceObject.getImplementationRef()));
for (org.activiti.bpmn.model.Operation operationObject : interfaceObject.getOperations()) {
if (this.messages.containsKey(operationObject.getInMessageRef())) {
MessageDefinition inMessage = this.messages.get(operationObject.getInMessageRef());
Operation operation = new Operation(operationObject.getId(), operationObject.getName(), bpmnInterface, inMessage);
operation.setImplementation(this.operationImplementations.get(operationObject.getImplementationRef()));
if (StringUtils.isNotEmpty(operationObject.getOutMessageRef())) {
if (this.messages.containsKey(operationObject.getOutMessageRef())) {
MessageDefinition outMessage = this.messages.get(operationObject.getOutMessageRef());
operation.setOutMessage(outMessage);
}
}
operations.put(operation.getId(), operation);
}
}
}
}
use of org.activiti.engine.impl.bpmn.webservice.MessageDefinition in project Activiti by Activiti.
the class WSOperation method createResponseMessage.
private MessageInstance createResponseMessage(Object[] results, Operation operation) {
MessageInstance message = null;
MessageDefinition outMessage = operation.getOutMessage();
if (outMessage != null) {
message = outMessage.createInstance();
message.getStructureInstance().loadFrom(results);
}
return message;
}
Aggregations