public void processDI() {

    if (processDefinitions.isEmpty()) {
      return;
    }

    if (!bpmnModel.getLocationMap().isEmpty()) {

      // Verify if all referenced elements exist
      for (String bpmnReference : bpmnModel.getLocationMap().keySet()) {
        if (bpmnModel.getFlowElement(bpmnReference) == null) {
          // ACT-1625: don't warn when artifacts are referenced from DI
          if (bpmnModel.getArtifact(bpmnReference) == null) {
            // Check if it's a Pool or Lane, then DI is ok
            if (bpmnModel.getPool(bpmnReference) == null && bpmnModel.getLane(bpmnReference) == null) {
              LOGGER.warn("Invalid reference in diagram interchange definition: could not find " + bpmnReference);
            }
          }
        } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof FlowNode)) {
          LOGGER.warn("Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a flow node");
        }
      }
      
      for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) {
        if (bpmnModel.getFlowElement(bpmnReference) == null) {
          // ACT-1625: don't warn when artifacts are referenced from DI
          if (bpmnModel.getArtifact(bpmnReference) == null) {
            LOGGER.warn("Invalid reference in diagram interchange definition: could not find " + bpmnReference);
          }
        } else if (!(bpmnModel.getFlowElement(bpmnReference) instanceof SequenceFlow)) {
          LOGGER.warn("Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a sequence flow");
        }
      }

      for (Process process : bpmnModel.getProcesses()) {
        if (!process.isExecutable()) {
          continue;
        }

        // Parse diagram interchange information
        ProcessDefinitionEntity processDefinition = getProcessDefinition(process.getId());
        if (processDefinition != null) {
          processDefinition.setGraphicalNotationDefined(true);
          
          for (String edgeId : bpmnModel.getFlowLocationMap().keySet()) {
            if (bpmnModel.getFlowElement(edgeId) != null) {
              createBPMNEdge(edgeId, bpmnModel.getFlowLocationGraphicInfo(edgeId));
            }
          }
        }
      }
    }
  }
public void processDI ( ) { if ( processDefinitions . isEmpty ( ) ) { return ; } if ( ! bpmnModel . getLocationMap ( ) . isEmpty ( ) ) { for ( String bpmnReference : bpmnModel . getLocationMap ( ) . keySet ( ) ) { if ( bpmnModel . getFlowElement ( bpmnReference ) == null ) { if ( bpmnModel . getArtifact ( bpmnReference ) == null ) { if ( bpmnModel . getPool ( bpmnReference ) == null && bpmnModel . getLane ( bpmnReference ) == null ) { LOGGER . warn ( "Invalid reference in diagram interchange definition: could not find " + bpmnReference ) ; } } } else if ( ! ( bpmnModel . getFlowElement ( bpmnReference ) instanceof FlowNode ) ) { LOGGER . warn ( "Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a flow node" ) ; } } for ( String bpmnReference : bpmnModel . getFlowLocationMap ( ) . keySet ( ) ) { if ( bpmnModel . getFlowElement ( bpmnReference ) == null ) { if ( bpmnModel . getArtifact ( bpmnReference ) == null ) { LOGGER . warn ( "Invalid reference in diagram interchange definition: could not find " + bpmnReference ) ; } } else if ( ! ( bpmnModel . getFlowElement ( bpmnReference ) instanceof SequenceFlow ) ) { LOGGER . warn ( "Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a sequence flow" ) ; } } for ( Process process : bpmnModel . getProcesses ( ) ) { if ( ! process . isExecutable ( ) ) { continue ; } ProcessDefinitionEntity processDefinition = getProcessDefinition ( process . getId ( ) ) ; if ( processDefinition != null ) { processDefinition . setGraphicalNotationDefined ( true ) ; for ( String edgeId : bpmnModel . getFlowLocationMap ( ) . keySet ( ) ) { if ( bpmnModel . getFlowElement ( edgeId ) != null ) { createBPMNEdge ( edgeId , bpmnModel . getFlowLocationGraphicInfo ( edgeId ) ) ; } } } } } }
/////////////////////////////////////////////////////////////////