Search in sources :

Example 1 with BpmnInterface

use of org.activiti.engine.impl.bpmn.webservice.BpmnInterface 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);
            }
        }
    }
}
Also used : MessageDefinition(org.activiti.engine.impl.bpmn.webservice.MessageDefinition) Operation(org.activiti.engine.impl.bpmn.webservice.Operation) BpmnInterface(org.activiti.engine.impl.bpmn.webservice.BpmnInterface) Interface(org.activiti.bpmn.model.Interface) BpmnInterface(org.activiti.engine.impl.bpmn.webservice.BpmnInterface)

Aggregations

Interface (org.activiti.bpmn.model.Interface)1 BpmnInterface (org.activiti.engine.impl.bpmn.webservice.BpmnInterface)1 MessageDefinition (org.activiti.engine.impl.bpmn.webservice.MessageDefinition)1 Operation (org.activiti.engine.impl.bpmn.webservice.Operation)1