fix(core): Remove circular dependency in WorkflowService and ActiveWorkflowRunner (#8128)

## Summary
A circular dependency between `WorkflowService` and
`ActiveWorkflowRunner` is sometimes causing `this.activeWorkflowRunner`
to be `undefined` in `WorkflowService`.
Breaking this circular dependency should hopefully fix this issue.

## Related tickets and issues
#8122


## Review / Merge checklist
- [x] PR title and summary are descriptive
- [ ] Tests included
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-12-21 17:37:08 +01:00
committed by GitHub
parent e9c7fd7397
commit 21788d9153
9 changed files with 98 additions and 86 deletions

View File

@@ -6,7 +6,7 @@ import type { IExecutionResponse, IExecutionFlattedResponse } from '@/Interfaces
import { EnterpriseWorkflowService } from '../workflows/workflow.service.ee';
import type { WorkflowWithSharingsAndCredentials } from '@/workflows/workflows.types';
import Container from 'typedi';
import { WorkflowService } from '@/workflows/workflow.service';
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
export class EEExecutionsService extends ExecutionsService {
/**
@@ -26,7 +26,7 @@ export class EEExecutionsService extends ExecutionsService {
const relations = ['shared', 'shared.user', 'shared.role'];
const workflow = (await Container.get(WorkflowService).get(
const workflow = (await Container.get(WorkflowRepository).get(
{ id: execution.workflowId },
{ relations },
)) as WorkflowWithSharingsAndCredentials;