Add flow to run output (#10220)

We need the version trigger and steps to be stored in the output. We
should not rely on the version itself because some run are made on draft
versions. Which means versions could be edited afterwards.
This commit is contained in:
Thomas Trompette
2025-02-14 15:20:27 +01:00
committed by GitHub
parent 5fe101545d
commit 017280384a
5 changed files with 61 additions and 38 deletions

View File

@ -22,6 +22,8 @@ import { FavoriteWorkspaceEntity } from 'src/modules/favorite/standard-objects/f
import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-objects/timeline-activity.workspace-entity';
import { WorkflowVersionWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow-version.workspace-entity';
import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow.workspace-entity';
import { WorkflowAction } from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action.type';
import { WorkflowTrigger } from 'src/modules/workflow/workflow-trigger/types/workflow-trigger.type';
export enum WorkflowRunStatus {
NOT_STARTED = 'NOT_STARTED',
@ -32,8 +34,6 @@ export enum WorkflowRunStatus {
type StepRunOutput = {
id: string;
name: string;
type: string;
outputs: {
attemptCount: number;
result: object | undefined;
@ -42,7 +42,11 @@ type StepRunOutput = {
};
export type WorkflowRunOutput = {
steps: Record<string, StepRunOutput>;
flow: {
trigger: WorkflowTrigger;
steps: WorkflowAction[];
};
stepsOutput: Record<string, StepRunOutput>;
error?: string;
};