Skip to content

Commit

Permalink
TE-624: Check null for embedded end connected outer
Browse files Browse the repository at this point in the history
  • Loading branch information
trungmaihova committed Jul 5, 2024
1 parent db79b63 commit 3b5aa5a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static com.axonivy.utils.process.inspector.internal.helper.AnalysisPathHelper.getInternalPath;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static java.util.Optional.ofNullable;
import static java.util.stream.Collectors.toMap;
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
import static org.apache.commons.lang3.StringUtils.EMPTY;
Expand Down Expand Up @@ -418,11 +419,11 @@ private DetectedElement createDetectedTask(TaskAndCaseModifier task, TaskConfig
return detectedTask;
}


private DetectedElement createDetectedEmbeddedEnd(EmbeddedEnd element, Duration timeUntilStartAt) {
String pid = element.getPid().getRawPid();
String connectedOuterSequenceFlowPid = element.getConnectedOuterSequenceFlow().getPid().getRawPid();
String elementName = element.getName();
String elementName = element.getName();
String connectedOuterSequenceFlowPid = ofNullable(element.getConnectedOuterSequenceFlow())
.map(it -> it.getPid().getRawPid()).orElse(null);

var detectedEmbeddedEnd = new DetectedEmbeddedEnd(pid, elementName, connectedOuterSequenceFlowPid, timeUntilStartAt);
return detectedEmbeddedEnd;
Expand Down

0 comments on commit 3b5aa5a

Please sign in to comment.