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

@ -1,8 +1,9 @@
import { Module } from '@nestjs/common';
import { WorkflowStatusModule } from 'src/modules/workflow/workflow-status/workflow-status.module';
import { WorkflowTriggerModule } from 'src/modules/workflow/workflow-trigger/workflow-trigger.module';
@Module({
imports: [WorkflowTriggerModule],
imports: [WorkflowTriggerModule, WorkflowStatusModule],
})
export class WorkflowModule {}