summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-29 08:40:08 (EST)
committer Stephan Born2012-11-29 08:40:08 (EST)
commit88b1903dcf2487e4f2fb5cef555625efefc3f0d6 (patch)
treeed11df64f96118e06f328775a8eb4924b0e0ce36
parentc707359af34979d83e5180d7420617b2400456f0 (diff)
downloadorg.eclipse.stardust.ui.web-88b1903dcf2487e4f2fb5cef555625efefc3f0d6.zip
org.eclipse.stardust.ui.web-88b1903dcf2487e4f2fb5cef555625efefc3f0d6.tar.gz
org.eclipse.stardust.ui.web-88b1903dcf2487e4f2fb5cef555625efefc3f0d6.tar.bz2
Jira-ID: CRNT-27204
a) Added code to skip caseDescriptor while common descriptor calculation and append caseDescriptor to the end of common descriptor list when "ALL Process" check is there in ProcessSearchBean.refreshDescriptorTable() git-svn-id: http://emeafrazerg/svn/ipp/product/branches/b_dev_7_1_0/stardust/ui.web@61239 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
index a8e18f0..5d00b05 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessSearchBean.java
@@ -139,6 +139,7 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
private List<SelectItem> hierarchyTypes;
private boolean preSearch;
+ private boolean allProcessDefSelected;
private String columnPrefKey = UserPreferencesEntries.V_PROCESS_SEARCH;
static
@@ -677,12 +678,14 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
private List<ProcessDefinition> getSelectedProcessDefs()
{
List<ProcessDefinition> selectedProcessDefs = new ArrayList<ProcessDefinition>();
-
+ allProcessDefSelected = false;
for (int i = 0; i < selectedProcesses.length; i++)
{
if (selectedProcesses[i].equals("ALL")) // all processes selected
{
selectedProcessDefs = new ArrayList<ProcessDefinition>(processDefinitions.values());
+ // flag used to filter Case Descriptor in common descriptor calculation
+ allProcessDefSelected = true;
break;
}
selectedProcessDefs.add(processDefinitions.get(selectedProcesses[i]));
@@ -791,7 +794,17 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
descriptorItems.clear();
if (CollectionUtils.isNotEmpty(selectedProcessDefs))
{
- commonDescriptors = CommonDescriptorUtils.getCommonDescriptors(selectedProcessDefs, true);
+ List<ProcessDefinition> selProcessDefs = new ArrayList<ProcessDefinition>();
+ selProcessDefs.addAll(selectedProcessDefs);
+ ProcessDefinition caseProcess = null;
+ if (allProcessDefSelected)
+ {
+ // Explicitly removing CaseProcess from Common Description retrieval
+ caseProcess = ProcessDefinitionUtils.getProcessDefinition(PredefinedConstants.CASE_PROCESS_ID);
+ selProcessDefs.remove(caseProcess);
+ }
+ commonDescriptors = CommonDescriptorUtils.getCommonDescriptors(selProcessDefs, true);
+
GenericDataMapping mapping;
DataMappingWrapper dmWrapper;
boolean includeCaseDescriptor = false;
@@ -808,10 +821,10 @@ public class ProcessSearchBean extends UIComponentBean implements ViewEventHandl
dmWrapper.setDefaultValue(null);
}
- // If selected Process doesn't contain Case Process, and Hierarchy is Case
- // RootPI add Case descriptors to filter criteria
- if (!includeCaseDescriptor
- & (SEARCH_OPTION.PROCESSES.equals(selectedSearchOption) & getFilterAttributes().isCaseOnlySearch()))
+ // Add case descriptor to filter criteria if 'ALL Processes' search is set or
+ // Hierarchy is Case RootPI add Case descriptors
+ if ( !includeCaseDescriptor
+ & ((SEARCH_OPTION.PROCESSES.equals(selectedSearchOption) & getFilterAttributes().isCaseOnlySearch()) || caseProcess != null))
{
descriptorItems.addAll(caseDescriptorItems);
}