Remove automated trigger update (#15663)

Automated triggers are duplicated on version update.
This commit is contained in:
Thomas Trompette
2025-11-06 11:01:24 +01:00
committed by GitHub
parent 051a226b6f
commit 259c8cde08
5 changed files with 120 additions and 103 deletions
@@ -67,14 +67,28 @@ export class WorkflowCommonWorkspaceService {
},
});
return this.getValidWorkflowVersionOrFail(workflowVersion);
}
async getValidWorkflowVersionOrFail(
workflowVersion: WorkflowVersionWorkspaceEntity | null,
): Promise<WorkflowVersionWorkspaceEntity> {
if (!workflowVersion) {
throw new WorkflowTriggerException(
'Workflow version not found',
WorkflowTriggerExceptionCode.NOT_FOUND,
WorkflowTriggerExceptionCode.INVALID_INPUT,
);
}
return workflowVersion;
// FIXME: For now we will make the trigger optional. Later, we'll have to ensure the trigger is defined when publishing the flow.
// if (!workflowVersion.trigger) {
// throw new WorkflowTriggerException(
// 'Workflow version does not contains trigger',
// WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION,
// );
// }
return { ...workflowVersion, trigger: workflowVersion.trigger };
}
async getObjectMetadataMaps(