Fix execution log order and move waiting states#91
Merged
philippfromme merged 11 commits intomainfrom Mar 30, 2026
Merged
Conversation
eccae4a to
2b87ebc
Compare
52 tasks
nikku
reviewed
Mar 27, 2026
0110486 to
13e79e7
Compare
Sort log entries not only by timestamp but also by causal priority when timestamps are equal. This ensures entries appear in a logically correct sequence even when the engine produces identical timestamps for related lifecycle events. Causal ordering is always applied for global status entries and only between related entries (same elementId or identity key) for runtime entries, preserving insertion order for unrelated entries.
Reverts #88 which was a fix for only one of the ordering issues.
Adds call activity to example
Introduce an `ENTRY_ORDER` enum to replace bare numeric literals (0–10) in `getEntryOrder`, making the causal ordering of execution log entries self-documenting.
Contributor
Author
|
Ready for final review. |
Buckwich
reviewed
Mar 30, 2026
| // order. | ||
| this._entries = entries | ||
| .map((entry, index) => /** @type {[number, ExecutionLogEntry]} */ ([ index, entry ])) | ||
| .sort(([ indexA, entryA ], [ indexB, entryB ]) => { |
Member
There was a problem hiding this comment.
could be a bit simpler. not sure whats better readable:
Suggested change
| .sort(([ indexA, entryA ], [ indexB, entryB ]) => { | |
| .sort(([ indexA, entryA ], [ indexB, entryB ]) => { | |
| if (isStatusEntry(entryA) || isStatusEntry(entryB)) { | |
| return compareEntryOrders(entryA, entryB); | |
| } | |
| return compareEntryTimestamps(entryA, entryB) | |
| || (areEntriesRelated(entryA, entryB) ? compareEntryOrders(entryA, entryB) : 0) | |
| || indexA - indexB; | |
| }) |
Buckwich
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Example: Execution log order
Example: Waiting state always visible and includes identifier (
Form)Related to #81 (comment)
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool