Skip to content

Commit

Permalink
TE-585: Fix UI for Demo and get parrent name
Browse files Browse the repository at this point in the history
  • Loading branch information
trungmaihova committed May 23, 2024
1 parent 946e3e8 commit d62ac61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,20 @@
title="#{task.pid}" />
</p:column>

<p:column headerText="Task Name">
<h:outputText value="#{task.taskName}" />
<p:column headerText="Task Name" styleClass="text-overflow">
<h:outputText value="#{task.taskName}" title="#{task.taskName}" />
</p:column>

<p:column headerText="Element Name">
<h:outputText value="#{task.elementName}" />
<p:column headerText="Element Name" styleClass="text-overflow">
<h:outputText value="#{task.elementName}" title="#{task.elementName}" />
</p:column>

<p:column headerText="Estimated Duration">
<h:outputText
value="#{data.processAnalyzerBean.getDisplayDuration(task.estimatedDuration)}" />
</p:column>

<p:column headerText="Parent Element Names"
styleClass="text-overflow">
<p:column headerText="Parent Element Names" styleClass="text-overflow">
<h:outputText value="#{task.displayParentElementNames}"
title="#{task.displayParentElementNames}" />
</p:column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.axonivy.utils.process.analyzer.model.DetectedTask;
import com.axonivy.utils.process.analyzer.model.ElementTask;

import ch.ivyteam.ivy.process.model.HierarchicElement;
import ch.ivyteam.ivy.process.model.connector.SequenceFlow;
import ch.ivyteam.ivy.process.model.element.EmbeddedProcessElement;
import ch.ivyteam.ivy.process.model.element.SingleTaskCreator;
Expand Down Expand Up @@ -296,9 +297,10 @@ private DetectedElement createDetectedTaskFromSubProcessCall(SubProcessCall subP
String taskName = getTaskNameByCode(script);
String customerInfo = getCustomInfoByCode(script);
Duration duration = this.workflowDuration().getDuration(ElementTask.createSingle(pid), script, useCase);

List<String> parentElementNames = getParentElementNames(subProcessCall);

DetectedTask detectedTask = new DetectedTask(pid, taskName, elementName, timeUntilStartAt, duration,
customerInfo);
parentElementNames, customerInfo);
return detectedTask;
}

Expand Down Expand Up @@ -357,8 +359,9 @@ private List<DetectedElement> keepMaxTimeUtilEndDetectedElement(List<DetectedEle
return result;
}

private List<String> getParentElementNames(TaskAndCaseModifier task) {
private List<String> getParentElementNames(HierarchicElement task) {
List<String> parentElementNames = emptyList();
if(task instanceof TaskAndCaseModifier || task instanceof SubProcessCall)
if (task.getParent() instanceof EmbeddedProcessElement) {
parentElementNames = processGraph.getParentElementNamesEmbeddedProcessElement(task.getParent());
}
Expand Down

0 comments on commit d62ac61

Please sign in to comment.