Add transition scheduling logic for phase-based advancement#661
Open
Add transition scheduling logic for phase-based advancement#661
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
726cc62 to
1263207
Compare
ce34f90 to
b5a934e
Compare
Implement date-based transition creation, update, and processing for decision process phases. Key changes: - Rewrite createTransitionsForProcess with date-based advancement filtering - Rewrite updateTransitionsForProcess with parallel operations - Refactor transitionMonitor for batch processing and deferred state updates - Move transition creation to publish time instead of instance creation - Add ScheduledTransition type and new exports
Transitions are no longer created on instance creation (DRAFT status). They are created when the instance is published.
Use v2 relational query API in createInstanceFromTemplate and updateDecisionInstance. transitionEngine and transitionMonitor remain on db._query as their relations are not yet in v2.
Instance data phases always contain rules (copied from template at creation time), so the extra process schema fetch is unnecessary. Removes the schema lookup and reads advancement rules directly from instanceData.phases[].rules.
3d4417d to
fb1de90
Compare
scazan
commented
Mar 5, 2026
| { | ||
| phaseId: 'phase-a', | ||
| rules: { advancement: { method: 'date' } }, | ||
| endDate: '2026-06-01T00:00:00.000Z', |
Collaborator
Author
There was a problem hiding this comment.
Are we using this at the root level of the phase or in the rules?
nourmalaeb
approved these changes
Mar 6, 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.
Summary
createTransitionsForProcesswith date-based advancement filteringupdateTransitionsForProcesswith parallel operationstransitionMonitorfor batch processing and deferred state updatesScheduledTransitiontype and new exports from@op/commonPart 2 of 3 in the transition scheduling logic stack:
encoder-type-consolidation(Consolidate ProcessPhase type and modernize process schema encoder #660) — Encoder/UI type consolidationtransition-scheduling-tests— Test suiteTest plan
pnpm typecheckpassespnpm format:checkpasses