feat(core): Change workflow deletions to soft deletes (#14894)

Adds soft‑deletion support for workflows through a new boolean column `isArchived`.

When a workflow is archived we now set `isArchived` flag to true and the workflows
stays in the database and is omitted from the default workflow listing query.

Archived workflows can be viewed in read-only mode, but they cannot be activated.

Archived workflows are still available by ID and can be invoked as sub-executions,
so existing Execute Workflow nodes continue to work. Execution engine doesn't
care about isArchived flag.

Users can restore workflows via Unarchive action at the UI.
This commit is contained in:
Jaakko Husso
2025-05-06 17:48:24 +03:00
committed by GitHub
parent 32b72011e6
commit 3a13139f78
64 changed files with 1616 additions and 124 deletions

View File

@@ -2262,6 +2262,7 @@ export interface IWorkflowBase {
id: string;
name: string;
active: boolean;
isArchived: boolean;
createdAt: Date;
startedAt?: Date;
updatedAt: Date;

View File

@@ -94,6 +94,7 @@ describe('generateNodesGraph', () => {
id: 'NfV4GV9aQTifSLc2',
name: 'My workflow 26',
active: false,
isArchived: false,
nodes: [
{
parameters: {},
@@ -157,6 +158,7 @@ describe('generateNodesGraph', () => {
id: 'NfV4GV9aQTifSLc2',
name: 'My workflow 26',
active: false,
isArchived: false,
nodes: [],
connections: {},
settings: { executionOrder: 'v1' },
@@ -198,6 +200,7 @@ describe('generateNodesGraph', () => {
id: 'NfV4GV9aQTifSLc2',
name: 'My workflow 26',
active: false,
isArchived: false,
nodes: [
{
parameters: {},
@@ -263,6 +266,7 @@ describe('generateNodesGraph', () => {
id: 'NfV4GV9aQTifSLc2',
name: 'My workflow 26',
active: false,
isArchived: false,
nodes: [
{
parameters: {},
@@ -339,6 +343,7 @@ describe('generateNodesGraph', () => {
id: 'NfV4GV9aQTifSLc2',
name: 'My workflow 26',
active: false,
isArchived: false,
nodes: [
{
parameters: {},