Skip to content

chore:user office experiment workflow#1391

Open
yoganandaness wants to merge 177 commits into
developfrom
SWAP-5222-user-office-experiment-workflow-improvement
Open

chore:user office experiment workflow#1391
yoganandaness wants to merge 177 commits into
developfrom
SWAP-5222-user-office-experiment-workflow-improvement

Conversation

@yoganandaness
Copy link
Copy Markdown
Contributor

This pull request introduces a major overhaul of the workflow data structures and migrates existing workflow data to the new schema. The changes are focused on improving workflow management, enabling more flexible graph-based workflows, and ensuring data integrity during migration. The update includes new tables, foreign key relationships, triggers, and migration scripts to transition all relevant data and references.

Schema redesign for workflow management:

  • Added new tables: workflow_has_statuses, workflow_status_connections, workflow_status_connection_has_workflow_status_changing_events, and workflow_status_connection_has_workflow_status_actions to support graph-based workflows, status transitions, and associated events/actions.
  • Updated the workflows table to include an updated_at timestamp, and renamed status_actions to workflow_status_actions for clarity.

Migration and data integrity:

  • Created comprehensive migration logic to transfer existing workflow nodes, edges, actions, and events to the new tables, with checks for unmapped data and warnings for any migration issues.
  • Updated references in proposals and experiment_safety tables to link to the new workflow graph, and added triggers to keep status_id in sync with the new workflow_status_id. [1] [2]

Cleanup and deprecation:

  • Removed deprecated tables and sequences related to the old workflow system, such as workflow_connections, workflow_connection_has_actions, and status_changing_events, after successful migration.

Event and action handling changes:

  • Events are now stored as strings in application code instead of a dedicated catalog table, simplifying event management and reducing schema complexity.

Referential integrity and constraints:

  • Enforced new foreign key and unique constraints to ensure all workflow transitions and actions/events are valid and prevent duplication or orphaned records. [1] [2]

Description

Motivation and Context

How Has This Been Tested

Fixes

Changes

Depends on

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

jekabskarklins added 30 commits December 22, 2025 14:13
…ntroducing CreateWorkflowConnection mutation
…vents table and updating related references
…tatusConnectionId and refactor related properties
…authorization checks for proposal assignments
jekabs-karklins and others added 23 commits April 20, 2026 14:43
Co-authored-by: Copilot <copilot@github.com>
…of github.com:UserOfficeProject/user-office-core into SWAP-5222-user-office-experiment-workflow-improvement
…re into SWAP-5222-user-office-experiment-workflow-improvement
…oject/user-office-core into SWAP-5222-user-office-experiment-workflow-improvement
Base automatically changed from SWAP-4949-workflow-overhaul to develop May 26, 2026 13:37
@yoganandaness
Copy link
Copy Markdown
Contributor Author

@copilot please resolve the merge conflicts. resolve those that you are confident of

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

@copilot please resolve the merge conflicts. resolve those that you are confident of

Resolved the merge conflicts and committed the merge resolution in 267e6db25.

@yoganandaness yoganandaness changed the title Swap 5222 user office experiment workflow improvement chore:user office experiment workflow May 29, 2026
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.

3 participants