private static Node findNodeByIdOrUniqueIdInMetadata( NodeContainer nodeContainer, String targetRef) { return findNodeByIdOrUniqueIdInMetadata(nodeContainer, targetRef, "Could not find target node for connection:" + targetRef); }
private static Object findNodeOrDataStoreByUniqueId(Definitions definitions, NodeContainer nodeContainer, final String nodeRef, String errorMsg) { if( definitions != null ) { List<DataStore> dataStores = definitions.getDataStores(); if( dataStores != null ) { for( DataStore dataStore : dataStores ) { if( nodeRef.equals(dataStore.getId()) ) { return dataStore; } } } } return findNodeByIdOrUniqueIdInMetadata(nodeContainer, nodeRef, errorMsg); }
Node t = findNodeByIdOrUniqueIdInMetadata(process, throwLink.getUniqueId()); Node c = findNodeByIdOrUniqueIdInMetadata(process, catchLink.getUniqueId()); if (t != null && c != null) {
for( EventFilter filter : ((EventNode) node).getEventFilters() ) { String type = ((EventTypeFilter) filter).getType(); Node attachedNode = findNodeByIdOrUniqueIdInMetadata(nodeContainer, attachedTo, "Could not find node to attach to: " + attachedTo);
for (SequenceFlow connection: connections) { String sourceRef = connection.getSourceRef(); Node source = findNodeByIdOrUniqueIdInMetadata(nodeContainer, sourceRef, "Could not find source node for connection:" + sourceRef); Node target = findNodeByIdOrUniqueIdInMetadata(nodeContainer, targetRef, "Could not find target node for connection:" + targetRef);
private static Node findNodeByIdOrUniqueIdInMetadata( NodeContainer nodeContainer, String targetRef) { return findNodeByIdOrUniqueIdInMetadata(nodeContainer, targetRef, "Could not find target node for connection:" + targetRef); }
private static Object findNodeOrDataStoreByUniqueId(Definitions definitions, NodeContainer nodeContainer, final String nodeRef, String errorMsg) { if( definitions != null ) { List<DataStore> dataStores = definitions.getDataStores(); if( dataStores != null ) { for( DataStore dataStore : dataStores ) { if( nodeRef.equals(dataStore.getId()) ) { return dataStore; } } } } return findNodeByIdOrUniqueIdInMetadata(nodeContainer, nodeRef, errorMsg); }
Node t = findNodeByIdOrUniqueIdInMetadata(process, throwLink.getUniqueId()); Node c = findNodeByIdOrUniqueIdInMetadata(process, catchLink.getUniqueId()); if (t != null && c != null) {
for( EventFilter filter : ((EventNode) node).getEventFilters() ) { String type = ((EventTypeFilter) filter).getType(); Node attachedNode = findNodeByIdOrUniqueIdInMetadata(nodeContainer, attachedTo, "Could not find node to attach to: " + attachedTo);
for (SequenceFlow connection: connections) { String sourceRef = connection.getSourceRef(); Node source = findNodeByIdOrUniqueIdInMetadata(nodeContainer, sourceRef, "Could not find source node for connection:" + sourceRef); Node target = findNodeByIdOrUniqueIdInMetadata(nodeContainer, targetRef, "Could not find target node for connection:" + targetRef);