Set statuses on workflows (#6792)

Add listener to keep status on workflows up to date:
- version draft => statuses should contain draft
- version active => statuses should contain active
- version deactivated => if no version active, statuses should contain
deactivated

Renaming also the endpoints because it was not reflecting the full
behaviour.

Finally, adding a new status Archived for versions. Will be used when a
version is deactivated, but is not the last published version anymore.
It means this version cannot be re-activated.
This commit is contained in:
Thomas Trompette
2024-08-30 18:06:04 +02:00
committed by GitHub
parent f7c99ddc7a
commit a3ea0acd1a
15 changed files with 1010 additions and 92 deletions

View File

@ -19,19 +19,19 @@ export class WorkflowTriggerResolver {
) {}
@Mutation(() => Boolean)
async enableWorkflowTrigger(
async activateWorkflowVersion(
@Args('workflowVersionId') workflowVersionId: string,
) {
return await this.workflowTriggerWorkspaceService.enableWorkflowTrigger(
return await this.workflowTriggerWorkspaceService.activateWorkflowVersion(
workflowVersionId,
);
}
@Mutation(() => Boolean)
async disableWorkflowTrigger(
async deactivateWorkflowVersion(
@Args('workflowVersionId') workflowVersionId: string,
) {
return await this.workflowTriggerWorkspaceService.disableWorkflowTrigger(
return await this.workflowTriggerWorkspaceService.deactivateWorkflowVersion(
workflowVersionId,
);
}