Provide executed step output instead of result (#16991)
For huge workflows, after 20 steps, we stop the job and re-trigger a new one. But some of those workflows actually never stop. See https://github.com/twentyhq/private-issues/issues/401 Here is a first issue. We resuming the workflow, we were providing the result instead of the output
This commit is contained in:
+5
-5
@@ -171,7 +171,7 @@ export class WorkflowExecutorWorkspaceService {
|
||||
|
||||
const nextStepIdsToExecute = await this.getNextStepIdsToExecute({
|
||||
executedStep: stepToExecute,
|
||||
executedStepResult: actionOutput,
|
||||
executedStepOutput: actionOutput,
|
||||
});
|
||||
|
||||
if (isDefined(nextStepIdsToExecute) && nextStepIdsToExecute.length > 0) {
|
||||
@@ -187,15 +187,15 @@ export class WorkflowExecutorWorkspaceService {
|
||||
|
||||
async getNextStepIdsToExecute({
|
||||
executedStep,
|
||||
executedStepResult,
|
||||
executedStepOutput,
|
||||
}: {
|
||||
executedStep: WorkflowAction;
|
||||
executedStepResult: WorkflowActionOutput;
|
||||
executedStepOutput: WorkflowActionOutput;
|
||||
}): Promise<string[] | undefined> {
|
||||
const isIteratorStep = isWorkflowIteratorAction(executedStep);
|
||||
|
||||
if (isIteratorStep) {
|
||||
const iteratorStepResult = executedStepResult.result as
|
||||
const iteratorStepResult = executedStepOutput.result as
|
||||
| WorkflowIteratorResult
|
||||
| undefined;
|
||||
|
||||
@@ -207,7 +207,7 @@ export class WorkflowExecutorWorkspaceService {
|
||||
}
|
||||
|
||||
if (isWorkflowIfElseAction(executedStep)) {
|
||||
const ifElseResult = executedStepResult.result as
|
||||
const ifElseResult = executedStepOutput.result as
|
||||
| WorkflowIfElseResult
|
||||
| undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user