summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-04-02 08:46:48 (EDT)
committer Sven Rottstock2013-04-02 08:46:48 (EDT)
commit17d903149a24d97d90658a2ac3c6f720f248b6bc (patch)
tree8db9f3970e43c315c07c81add3219e38e32cac74
parent5bb26bef496729dd2a8c30c41bafaead24643a18 (diff)
downloadorg.eclipse.stardust.ui.web-17d903149a24d97d90658a2ac3c6f720f248b6bc.zip
org.eclipse.stardust.ui.web-17d903149a24d97d90658a2ac3c6f720f248b6bc.tar.gz
org.eclipse.stardust.ui.web-17d903149a24d97d90658a2ac3c6f720f248b6bc.tar.bz2
Jira-ID: CRNT-28580
Added method isInitialzed() in ProcessWorklistCacheManager.java Checked ProcessWorklistCacheManager.isInitialized() before calling handleActivityEvent on ProcessWorklistCacheManager @ PPUtils.java and ActivityInstanceUtils.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@64034 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/common/PPUtils.java5
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java8
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ActivityInstanceUtils.java5
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java10
4 files changed, 24 insertions, 4 deletions
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/common/PPUtils.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/common/PPUtils.java
index d988df7..4e4ce25 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/common/PPUtils.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/common/PPUtils.java
@@ -676,7 +676,10 @@ public class PPUtils
public static void sendActivityEvent(ActivityInstance oldAi, ActivityEvent activityEvent)
{
ParticipantWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
- ProcessWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
+ if (ProcessWorklistCacheManager.isInitialized())
+ {
+ ProcessWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
+ }
SpecialWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
ClientContextBean.getCurrentInstance().getClientContext().sendActivityEvent(activityEvent);
}
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
index 186709a..6de0a18 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/WorklistTableBean.java
@@ -383,8 +383,12 @@ public class WorklistTableBean extends UIComponentBean
}
else
{
- ProcessWorklistCacheManager.getInstance().setWorklistCount(worklistId, queryResult.getTotalCount());
- ProcessWorklistCacheManager.getInstance().setWorklistThresholdCount(worklistId, queryResult.getTotalCountThreshold());
+ if (ProcessWorklistCacheManager.isInitialized())
+ {
+ ProcessWorklistCacheManager.getInstance().setWorklistCount(worklistId, queryResult.getTotalCount());
+ ProcessWorklistCacheManager.getInstance().setWorklistThresholdCount(worklistId,
+ queryResult.getTotalCountThreshold());
+ }
}
}
}
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ActivityInstanceUtils.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ActivityInstanceUtils.java
index 0a3d43b..9daa441 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ActivityInstanceUtils.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ActivityInstanceUtils.java
@@ -632,7 +632,10 @@ public class ActivityInstanceUtils
public static void sendActivityEvent(ActivityInstance oldAi, ActivityEvent activityEvent)
{
ParticipantWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
- ProcessWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
+ if (ProcessWorklistCacheManager.isInitialized())
+ {
+ ProcessWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
+ }
SpecialWorklistCacheManager.getInstance().handleActivityEvent(oldAi, activityEvent);
ClientContextBean.getCurrentInstance().getClientContext().sendActivityEvent(activityEvent);
}
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
index 91ab628..22f8110 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
@@ -56,6 +56,16 @@ public class ProcessWorklistCacheManager implements InitializingBean
}
return cacheManager;
}
+
+ /**
+ *
+ * @return
+ */
+ public static boolean isInitialized()
+ {
+ ProcessWorklistCacheManager cacheManager = (ProcessWorklistCacheManager) FacesUtils.getBeanFromContext(BEAN_ID);
+ return cacheManager.initialized;
+ }
/*
* (non-Javadoc)