summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-03-13 07:41:22 (EDT)
committer Manik Kishore2012-06-19 07:20:55 (EDT)
commitefec01dcc4ed588d3ac4a9c9f2d53922dc699b33 (patch)
treeb19cbec256765103073e11ca5e72a0592352d930
parent7e2d913ac09c85e6418cd211401e3a6871ae38a0 (diff)
downloadorg.eclipse.stardust.ui.web-efec01dcc4ed588d3ac4a9c9f2d53922dc699b33.zip
org.eclipse.stardust.ui.web-efec01dcc4ed588d3ac4a9c9f2d53922dc699b33.tar.gz
org.eclipse.stardust.ui.web-efec01dcc4ed588d3ac4a9c9f2d53922dc699b33.tar.bz2
Jira-ID: CRNT-24180
1)Added check for TerminatedProcess in ProcessInstanceDetailsBean.java for disableSpawnProcess flag and used in ProcessInstanceDetailsViewToolbar.xhtml 2)Added check for terminatedProcess in ProcessInstanceHistoryItem.java and used in processInstanceHistoryTableColumns.xhtml. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54501 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessInstanceHistoryItem.java13
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessTableEntryUserObject.java5
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java17
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/extension/toolbar/processInstanceDetailsViewToolbar.xhtml4
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/processhistory/processInstanceHistoryTableColumns.xhtml4
5 files changed, 37 insertions, 6 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessInstanceHistoryItem.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessInstanceHistoryItem.java
index c3f8ba8..184c741 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessInstanceHistoryItem.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessInstanceHistoryItem.java
@@ -16,6 +16,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.stardust.common.CollectionUtils;
import org.eclipse.stardust.engine.api.dto.ProcessInstanceDetails;
import org.eclipse.stardust.engine.api.model.Model;
import org.eclipse.stardust.engine.api.model.ProcessDefinition;
@@ -60,6 +61,7 @@ public class ProcessInstanceHistoryItem extends AbstractProcessHistoryTableEntry
private boolean selected;
private boolean caseInstance;
private boolean enableDetach;
+ private boolean disableSpawnProcess;
private final ProcessInstance rootProcessInstance;
/**
@@ -95,7 +97,9 @@ public class ProcessInstanceHistoryItem extends AbstractProcessHistoryTableEntry
processInstanceRootOID = processInstance.getRootProcessInstanceOID();
notesCount = ProcessInstanceUtils.getNotes(processInstance).size();
this.enableTerminate = ProcessInstanceUtils.isAbortable(processInstance);
-
+ List<ProcessInstance> piList = CollectionUtils.newArrayList();
+ piList.add(processInstance);
+ this.disableSpawnProcess = ProcessInstanceUtils.isTerminatedProcessInstances(piList);
this.enableRecover = true;
Model model = ModelCache.findModelCache().getModel(processInstance.getModelOID());
@@ -321,6 +325,13 @@ public class ProcessInstanceHistoryItem extends AbstractProcessHistoryTableEntry
{
return rootProcessInstance;
}
+
+ public boolean isDisableSpawnProcess()
+ {
+ return disableSpawnProcess;
+ }
+
+
} \ No newline at end of file
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessTableEntryUserObject.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessTableEntryUserObject.java
index 10a6655..f85ac3c 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessTableEntryUserObject.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/process/history/ProcessTableEntryUserObject.java
@@ -227,6 +227,11 @@ public class ProcessTableEntryUserObject extends NodeUserObject
{
return tableEntry.isEnableTerminate();
}
+
+ public boolean isDisableSpawnProcess()
+ {
+ return tableEntry.isDisableSpawnProcess();
+ }
public boolean isMoreDetailsAvailable()
{
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
index a90fc4d..a13d3da 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
@@ -123,7 +123,7 @@ public class ProcessInstanceDetailsBean extends PopupUIComponentBean
private boolean hasSpawnProcessPermission;
private boolean hasSwitchProcessPermission;
private boolean hasJoinProcessPermission;
-
+ private boolean disableSpawnProcess = false;
/**
*
@@ -175,6 +175,9 @@ public class ProcessInstanceDetailsBean extends PopupUIComponentBean
setSupportsProcessAttachments(DMSHelper.existsProcessAttachmentsDataPath(processInstance));
setAbortProcess(ProcessInstanceUtils.isAbortable(processInstance));
+ List<ProcessInstance> sourceList = CollectionUtils.newArrayList();
+ sourceList.add(processInstance);
+ setDisableSpawnProcess(ProcessInstanceUtils.isTerminatedProcessInstances(sourceList));
state = MessagesViewsCommonBean.getInstance().getString(
STATE_PREFIX + processInstance.getState().getName().toLowerCase());
@@ -917,5 +920,17 @@ public class ProcessInstanceDetailsBean extends PopupUIComponentBean
public boolean isEnableJoinProcess()
{
return hasJoinProcessPermission;
+ }
+
+ public boolean isDisableSpawnProcess()
+ {
+ return disableSpawnProcess;
+ }
+
+ public void setDisableSpawnProcess(boolean disableSpawnProcess)
+ {
+ this.disableSpawnProcess = disableSpawnProcess;
}
+
+
} \ No newline at end of file
diff --git a/views-common/src/main/resources/META-INF/xhtml/extension/toolbar/processInstanceDetailsViewToolbar.xhtml b/views-common/src/main/resources/META-INF/xhtml/extension/toolbar/processInstanceDetailsViewToolbar.xhtml
index 501213e..4a0ccbf 100644
--- a/views-common/src/main/resources/META-INF/xhtml/extension/toolbar/processInstanceDetailsViewToolbar.xhtml
+++ b/views-common/src/main/resources/META-INF/xhtml/extension/toolbar/processInstanceDetailsViewToolbar.xhtml
@@ -53,11 +53,11 @@
</ice:panelGroup>
<ice:commandLink action="#{spawnProcessDialogBean.openPopup}" rendered="#{processInstanceDetailsBean.enableSpawnProcess}"
- immediate="true" disabled="#{!processInstanceDetailsBean.abortProcess}">
+ immediate="true" disabled="#{processInstanceDetailsBean.disableSpawnProcess}">
<pc:automationTag value="auto-COM-PCESpawnProcess" standAlone="false" />
<ice:graphicImage
value="/plugins/views-common/images/icons/cog_add.png"
- styleClass="#{processInstanceDetailsBean.abortProcess and processInstanceDetailsBean.enableSpawnProcess? '' : 'iceCmdBtn-dis'}"
+ styleClass="#{!processInstanceDetailsBean.disableSpawnProcess and processInstanceDetailsBean.enableSpawnProcess? '' : 'iceCmdBtn-dis'}"
title="#{views_common_msgPropsBean['views.spawnProcessDialog.title']}" />
<f:param name="processInstanceOID"
value="#{processInstanceDetailsBean.processInstanceOID}" />
diff --git a/views-common/src/main/resources/META-INF/xhtml/processhistory/processInstanceHistoryTableColumns.xhtml b/views-common/src/main/resources/META-INF/xhtml/processhistory/processInstanceHistoryTableColumns.xhtml
index e36970a..c970d8a 100644
--- a/views-common/src/main/resources/META-INF/xhtml/processhistory/processInstanceHistoryTableColumns.xhtml
+++ b/views-common/src/main/resources/META-INF/xhtml/processhistory/processInstanceHistoryTableColumns.xhtml
@@ -134,12 +134,12 @@
<ice:commandLink
actionListener="#{processHistoryTable.openSpawnProcess}"
rendered="#{processHistoryTable.enableSpawnProcess and !processHistoryTable.enableCase}"
- disabled="#{not row.enableTerminate}">
+ disabled="#{row.disableSpawnProcess}">
<pc:automationTag value="auto-COM-PCEHistoryTable-ActionsSpawn" standAlone="false"/>
<ice:graphicImage
value="/plugins/views-common/images/icons/cog_add.png"
style="border: none;"
- styleClass="#{row.enableTerminate and processHistoryTable.enableSpawnProcess? '' : 'iceCmdBtn-dis'}"
+ styleClass="#{!row.disableSpawnProcess and processHistoryTable.enableSpawnProcess? '' : 'iceCmdBtn-dis'}"
title="#{views_common_msgPropsBean['views.spawnProcessDialog.title']}" />
<f:attribute name="processInstance" value="#{row.processInstance}" />
</ice:commandLink>