feat(core): Initial workflow history API (#7234)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Val
2023-09-27 15:22:39 +01:00
committed by GitHub
parent 5c57e2ccc3
commit 0083a9e45d
14 changed files with 474 additions and 17 deletions

View File

@@ -33,6 +33,8 @@ import { WorkflowRepository } from '@/databases/repositories';
import { RoleService } from '@/services/role.service';
import { OwnershipService } from '@/services/ownership.service';
import { isStringArray, isWorkflowIdValid } from '@/utils';
import { isWorkflowHistoryLicensed } from './workflowHistory/workflowHistoryHelper.ee';
import { WorkflowHistoryService } from './workflowHistory/workflowHistory.service.ee';
export class WorkflowsService {
static async getSharing(
@@ -298,6 +300,10 @@ export class WorkflowsService {
);
}
if (isWorkflowHistoryLicensed()) {
await Container.get(WorkflowHistoryService).saveVersion(user, shared.workflow);
}
const relations = config.getEnv('workflowTagsDisabled') ? [] : ['tags'];
// We sadly get nothing back from "update". Neither if it updated a record