Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6658 workflows add a first twenty piece email sender #6965

Merged
merged 24 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typing
  • Loading branch information
martmull committed Sep 10, 2024
commit 2e44781656380283a329e3c276e6c3d71e113583
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ type WorkflowError = {
};

export type WorkflowStepResult = {
data: object | null;
data?: object;
martmull marked this conversation as resolved.
Show resolved Hide resolved
error?: WorkflowError;
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export class CodeActionExecutor implements WorkflowStepExecutor {
payload || {},
);

return { data: result.data, ...(result.error && { error: result.error }) };
if (result.error) {
return { error: result.error };
}

return { data: result.data || {} };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ export class SystemActionExecutor implements WorkflowStepExecutor {
step: WorkflowSystemStep;
payload?: object;
}): Promise<WorkflowStepResult> {
const workflowSystemAction = this.workflowSystemActionFactory.get(
step.settings.systemActionType,
);
try {
const workflowSystemAction = this.workflowSystemActionFactory.get(
step.settings.systemActionType,
);

return await workflowSystemAction.execute({ step, payload });
return await workflowSystemAction.execute({ step, payload });
} catch (error) {
return { error };
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ export class SendEmailAction implements WorkflowSystemAction {
html,
});

return { data: null };
return { data: {} };
}
}