diff --git a/org.talend.librariesmanager/resources/java/routines/system/Document.java b/org.talend.librariesmanager/resources/java/routines/system/Document.java index 84249c32ce..c5d6ec2867 100644 --- a/org.talend.librariesmanager/resources/java/routines/system/Document.java +++ b/org.talend.librariesmanager/resources/java/routines/system/Document.java @@ -66,26 +66,28 @@ public class Document { for (org.dom4j.tree.AbstractNode node : nodes) { boolean reject = false; // lookup action - for (String xpath : lookupInfo.keySet()) { - Object lookupValue = lookupInfo.get(xpath); - org.dom4j.XPath xpathObjectForLookup = node.createXPath(xpath); - xpathObjectForLookup.setNamespaceURIs(nsMapping); - Node nodeOfLookup = xpathObjectForLookup.selectSingleNode(node); - //parse action - String text = (nodeOfLookup == null ? null : xpathObjectForLookup.valueOf(node)); - String pattern = xpathToPatternMap.get(xpath); - String javaType = xpathToTypeMap.get(xpath); - Object value = ParserUtils.parse(text, javaType, pattern); - - if(lookupValue == null && value == null) { - //do nothing(null==null) - } else { - if(value == null || !value.equals(lookupValue)) { - reject = true; - break; - } - } - + if(!"ALL_ROWS".equals(matchingMode)) { + for (String xpath : lookupInfo.keySet()) { + Object lookupValue = lookupInfo.get(xpath); + org.dom4j.XPath xpathObjectForLookup = node.createXPath(xpath); + xpathObjectForLookup.setNamespaceURIs(nsMapping); + Node nodeOfLookup = xpathObjectForLookup.selectSingleNode(node); + //parse action + String text = (nodeOfLookup == null ? null : xpathObjectForLookup.valueOf(node)); + String pattern = xpathToPatternMap.get(xpath); + String javaType = xpathToTypeMap.get(xpath); + Object value = ParserUtils.parse(text, javaType, pattern); + + if(lookupValue == null && value == null) { + //do nothing(null==null) + } else { + if(value == null || !value.equals(lookupValue)) { + reject = true; + break; + } + } + + } } // generate result action if (reject) { diff --git a/org.talend.librariesmanager/resources/java/routines/system/DocumentLookupCache.java b/org.talend.librariesmanager/resources/java/routines/system/DocumentLookupCache.java index f7962a803b..e2a484a1b1 100644 --- a/org.talend.librariesmanager/resources/java/routines/system/DocumentLookupCache.java +++ b/org.talend.librariesmanager/resources/java/routines/system/DocumentLookupCache.java @@ -19,7 +19,7 @@ public class DocumentLookupCache { cache = new UniqueLookupCache(); } else if("FIRST_MATCH".equals(matchingMode)) { cache = new FirstLookupCache(); - } else if("ALL_MATCHES".equals(matchingMode)) { + } else if("ALL_MATCHES".equals(matchingMode) || "ALL_ROWS".equals(matchingMode)) { cache = new AllMatchLookupCache(); } }