Search in sources :

Example 1 with DataRef

use of org.activiti.engine.impl.bpmn.data.DataRef in project Activiti by Activiti.

the class AbstractBpmnParseHandler method createIOSpecification.

protected IOSpecification createIOSpecification(BpmnParse bpmnParse, org.activiti.bpmn.model.IOSpecification specificationModel) {
    IOSpecification ioSpecification = new IOSpecification();
    for (DataSpec dataInputElement : specificationModel.getDataInputs()) {
        ItemDefinition itemDefinition = bpmnParse.getItemDefinitions().get(dataInputElement.getItemSubjectRef());
        Data dataInput = new Data(bpmnParse.getTargetNamespace() + ":" + dataInputElement.getId(), dataInputElement.getId(), itemDefinition);
        ioSpecification.addInput(dataInput);
    }
    for (DataSpec dataOutputElement : specificationModel.getDataOutputs()) {
        ItemDefinition itemDefinition = bpmnParse.getItemDefinitions().get(dataOutputElement.getItemSubjectRef());
        Data dataOutput = new Data(bpmnParse.getTargetNamespace() + ":" + dataOutputElement.getId(), dataOutputElement.getId(), itemDefinition);
        ioSpecification.addOutput(dataOutput);
    }
    for (String dataInputRef : specificationModel.getDataInputRefs()) {
        DataRef dataRef = new DataRef(dataInputRef);
        ioSpecification.addInputRef(dataRef);
    }
    for (String dataOutputRef : specificationModel.getDataOutputRefs()) {
        DataRef dataRef = new DataRef(dataOutputRef);
        ioSpecification.addOutputRef(dataRef);
    }
    return ioSpecification;
}
Also used : DataRef(org.activiti.engine.impl.bpmn.data.DataRef) IOSpecification(org.activiti.engine.impl.bpmn.data.IOSpecification) ItemDefinition(org.activiti.engine.impl.bpmn.data.ItemDefinition) DataSpec(org.activiti.bpmn.model.DataSpec) Data(org.activiti.engine.impl.bpmn.data.Data)

Aggregations

DataSpec (org.activiti.bpmn.model.DataSpec)1 Data (org.activiti.engine.impl.bpmn.data.Data)1 DataRef (org.activiti.engine.impl.bpmn.data.DataRef)1 IOSpecification (org.activiti.engine.impl.bpmn.data.IOSpecification)1 ItemDefinition (org.activiti.engine.impl.bpmn.data.ItemDefinition)1