Skip to content

fix: use server-side timestamp for instance-started log entry#88

Merged
jarekdanielak merged 1 commit intomainfrom
fix-execution-log-order
Mar 12, 2026
Merged

fix: use server-side timestamp for instance-started log entry#88
jarekdanielak merged 1 commit intomainfrom
fix-execution-log-order

Conversation

@AlekseyManetov
Copy link
Contributor

Closes #86

Proposed Changes

The instance-started log entry used a client-side Date.now() timestamp captured when the HTTP response arrived, which could be later than the server-side element instance timestamps for fast tasks (e.g. script tasks), causing wrong entry ordering. Fixed by preferring the server-side process instance startDate from the polled result when available, falling back to the client timestamp before the first poll.

Before:
Image

After:
image

Checklist

Ensure you provide everything we need to review your contribution:

  • Your contribution meets the definition of done
  • Any new additions or modifications are consistent with the existing UI and UX patterns
  • Pull request description establishes context:
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

};
}

const processInstanceResponse = this._polledResult?.result?.processInstanceResponse;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to the place where we set the polled result (ExecutionLog#setPolledResult).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@AlekseyManetov AlekseyManetov force-pushed the fix-execution-log-order branch from 57b7003 to 9815425 Compare March 12, 2026 11:14
@jarekdanielak jarekdanielak merged commit 762d625 into main Mar 12, 2026
5 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Mar 12, 2026
@jarekdanielak jarekdanielak deleted the fix-execution-log-order branch March 12, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Execution log represents task activation in wrong order

3 participants