summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-01-23 09:11:42 (EST)
committer Sven Rottstock2013-01-23 09:11:42 (EST)
commit2607294745f22610487207e9e086f9081cd76426 (patch)
tree04ad6c5fa79293643651e2c1c11dd45ccad180ac
parent53bae2530cf2e3d49b155e0cb93086f45fe808c0 (diff)
downloadorg.eclipse.stardust.ui.web-2607294745f22610487207e9e086f9081cd76426.zip
org.eclipse.stardust.ui.web-2607294745f22610487207e9e086f9081cd76426.tar.gz
org.eclipse.stardust.ui.web-2607294745f22610487207e9e086f9081cd76426.tar.bz2
Jira-ID: CRNT-27687
Added EvaluateByWorkitemsPolicy.WORKITEMS policy while retrieving ActivityInstanceQuery. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@62315 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/WorklistUtils.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/WorklistUtils.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/WorklistUtils.java
index 5c8bb4f..b747721 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/WorklistUtils.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/WorklistUtils.java
@@ -36,6 +36,7 @@ import org.eclipse.stardust.engine.api.query.ActivityFilter;
import org.eclipse.stardust.engine.api.query.ActivityInstanceQuery;
import org.eclipse.stardust.engine.api.query.ActivityInstances;
import org.eclipse.stardust.engine.api.query.DescriptorPolicy;
+import org.eclipse.stardust.engine.api.query.EvaluateByWorkitemsPolicy;
import org.eclipse.stardust.engine.api.query.ExcludeUserPolicy;
import org.eclipse.stardust.engine.api.query.FilterOrTerm;
import org.eclipse.stardust.engine.api.query.HistoricalStatesPolicy;
@@ -405,6 +406,7 @@ public class WorklistUtils
ActivityInstanceState.Application, ActivityInstanceState.Suspended});
// only evaluate count
query.setPolicy(new SubsetPolicy(0, true));
+ query.setPolicy(EvaluateByWorkitemsPolicy.WORKITEMS);
query.where(new ProcessDefinitionFilter(process.getQualifiedId(), false));
FilterOrTerm or = query.getFilter().addOrTerm();
or.add(PerformingParticipantFilter.ANY_FOR_USER).add(PerformingUserFilter.CURRENT_USER);
@@ -425,6 +427,8 @@ public class WorklistUtils
{
ActivityInstanceQuery allAssignedActivitiesQuery = ActivityInstanceQuery.findInState(new ActivityInstanceState[] {
ActivityInstanceState.Application, ActivityInstanceState.Suspended});
+ allAssignedActivitiesQuery.setPolicy(EvaluateByWorkitemsPolicy.WORKITEMS);
+
FilterOrTerm or = allAssignedActivitiesQuery.getFilter().addOrTerm();
or.add(PerformingParticipantFilter.ANY_FOR_USER).add(PerformingUserFilter.CURRENT_USER);
allAssignedActivitiesQuery.setPolicy(new SubsetPolicy(0, true));
@@ -450,7 +454,8 @@ public class WorklistUtils
or.add(PerformingParticipantFilter.ANY_FOR_USER).add(PerformingUserFilter.CURRENT_USER);
criticalActivitiesQuery.setPolicy(new SubsetPolicy(0, true));
criticalActivitiesQuery.setPolicy(ExcludeUserPolicy.EXCLUDE_USER);
-
+ criticalActivitiesQuery.setPolicy(EvaluateByWorkitemsPolicy.WORKITEMS);
+
criticalActivitiesQuery.where(ActivityInstanceQuery.CRITICALITY.between(
CriticalityConfigurationUtil.getEngineCriticality(criticality.getRangeFrom()),
CriticalityConfigurationUtil.getEngineCriticality(criticality.getRangeTo())));