Skip to content

Commit

Permalink
[Fix #3725] Setting leaveTime in Split and Fault node instance (#3726)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado authored Oct 15, 2024
1 parent e532628 commit 342ef3b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void beforeNodeLeft(ProcessNodeLeftEvent event) {
}

private void recordNodeDuration(DistributionSummary summary, KogitoNodeInstance instance, TimeUnit target) {
if (instance.getTriggerTime() != null) {
if (instance.getTriggerTime() != null && instance.getLeaveTime() != null) {
double duration = target.convert(instance.getLeaveTime().getTime() - instance.getTriggerTime().getTime(), TimeUnit.MILLISECONDS);
summary.record(duration);
LOGGER.debug("Recorded {} {} because of node {} for summary {}", duration, target, instance.getNode().getName(), summary.getId().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public void internalTrigger(KogitoNodeInstance from, String type) {
if (getNode().getMetaData().get("hidden") != null) {
hidden = true;
}
leaveTime = new Date();
if (!hidden) {
InternalKnowledgeRuntime kruntime = getProcessInstance().getKnowledgeRuntime();
((InternalProcessRuntime) kruntime.getProcessRuntime())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ protected void executeStrategy(Split split, String type) {
if (getNode().getMetaData().get("hidden") != null) {
hidden = true;
}
leaveTime = new Date();
InternalKnowledgeRuntime kruntime = getProcessInstance().getKnowledgeRuntime();
if (!hidden) {
((InternalProcessRuntime) kruntime.getProcessRuntime())
Expand Down

0 comments on commit 342ef3b

Please sign in to comment.