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:
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user