summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntje Fuhrmann2013-02-04 02:33:48 (EST)
committerSven Rottstock2013-02-04 02:33:48 (EST)
commit022cd077f6a82e6141fd9243077392ed90f87ad2 (patch)
treea430f5d17f094003a10816026bf0eaa4617a6ef8
parent156ecbaabd523bd6445bcc44086a11e1ae3c9fc0 (diff)
downloadorg.eclipse.stardust.engine-022cd077f6a82e6141fd9243077392ed90f87ad2.zip
org.eclipse.stardust.engine-022cd077f6a82e6141fd9243077392ed90f87ad2.tar.gz
org.eclipse.stardust.engine-022cd077f6a82e6141fd9243077392ed90f87ad2.tar.bz2
Jira-ID: CRNT-27825
ActivityInstanceQuery with ExcludeUserPolicy.EXCLUDE_USER applied still does perform extra SQL fetches for ProcessInstances if StructuredDataValue with XPath to primitive leaf node is used git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/engine@62744 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/utils/AbstractAuthorization2Predicate.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/utils/AbstractAuthorization2Predicate.java b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/utils/AbstractAuthorization2Predicate.java
index f6acd95..67601c1 100644
--- a/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/utils/AbstractAuthorization2Predicate.java
+++ b/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/core/runtime/utils/AbstractAuthorization2Predicate.java
@@ -80,7 +80,11 @@ import org.eclipse.stardust.engine.core.runtime.beans.removethis.SecurityPropert
import org.eclipse.stardust.engine.core.spi.extensions.runtime.AccessPathEvaluationContext;
import org.eclipse.stardust.engine.core.spi.extensions.runtime.ExtendedAccessPathEvaluator;
import org.eclipse.stardust.engine.core.spi.extensions.runtime.SpiUtils;
+import org.eclipse.stardust.engine.core.struct.DataXPathMap;
+import org.eclipse.stardust.engine.core.struct.IXPathMap;
+import org.eclipse.stardust.engine.core.struct.StructuredDataXPathUtils;
import org.eclipse.stardust.engine.core.struct.StructuredTypeRtUtils;
+import org.eclipse.stardust.engine.core.struct.TypedXPath;
import org.eclipse.stardust.engine.extensions.dms.data.DmsConstants;
/**
@@ -643,9 +647,15 @@ public abstract class AbstractAuthorization2Predicate implements Authorization2P
}
}
}
-
- if (!StructuredTypeRtUtils.isStructuredType(data.getType().getId())
- && !StringUtils.isEmpty(dataPath))
+ boolean isPrimitiveStructType = false;
+ if (StructuredTypeRtUtils.isStructuredType(data.getType().getId()))
+ {
+ IXPathMap xPathMap = DataXPathMap.getXPathMap(data);
+ TypedXPath typedXPath = xPathMap.getXPath(dataPath);
+ isPrimitiveStructType = StructuredDataXPathUtils
+ .isPrimitiveType(typedXPath);
+ }
+ if (!isPrimitiveStructType && !StringUtils.isEmpty(dataPath))
{
IProcessInstance processInstance = ProcessInstanceBean
.findByOID(processInstanceOID);