add continue on failure in task block (#982)
This commit is contained in:
@@ -73,6 +73,7 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
||||
maxRetries: data.maxRetries,
|
||||
maxStepsOverride: data.maxStepsOverride,
|
||||
allowDownloads: data.allowDownloads,
|
||||
continueOnFailure: data.continueOnFailure,
|
||||
downloadSuffix: data.downloadSuffix,
|
||||
errorCodeMapping: data.errorCodeMapping,
|
||||
totpVerificationUrl: data.totpVerificationUrl,
|
||||
@@ -333,6 +334,24 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex gap-2">
|
||||
<Label className="text-xs font-normal text-slate-300">
|
||||
Continue on Failure
|
||||
</Label>
|
||||
</div>
|
||||
<div className="w-52">
|
||||
<Switch
|
||||
checked={inputs.continueOnFailure}
|
||||
onCheckedChange={(checked) => {
|
||||
if (!editable) {
|
||||
return;
|
||||
}
|
||||
handleChange("continueOnFailure", checked);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex gap-2">
|
||||
<Label className="text-xs font-normal text-slate-300">
|
||||
|
||||
@@ -15,6 +15,7 @@ export type TaskNodeData = {
|
||||
parameterKeys: Array<string>;
|
||||
totpVerificationUrl: string | null;
|
||||
totpIdentifier: string | null;
|
||||
continueOnFailure: boolean;
|
||||
};
|
||||
|
||||
export type TaskNode = Node<TaskNodeData, "task">;
|
||||
@@ -36,6 +37,7 @@ export const taskNodeDefaultData: TaskNodeData = {
|
||||
parameterKeys: [],
|
||||
totpVerificationUrl: null,
|
||||
totpIdentifier: null,
|
||||
continueOnFailure: false,
|
||||
} as const;
|
||||
|
||||
export function isTaskNode(node: Node): node is TaskNode {
|
||||
|
||||
@@ -147,6 +147,7 @@ function convertToNode(
|
||||
parameterKeys: block.parameters.map((p) => p.key),
|
||||
totpIdentifier: block.totp_identifier ?? null,
|
||||
totpVerificationUrl: block.totp_verification_url ?? null,
|
||||
continueOnFailure: block.continue_on_failure,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -518,6 +519,7 @@ function getWorkflowBlock(
|
||||
parameter_keys: node.data.parameterKeys,
|
||||
totp_identifier: node.data.totpIdentifier,
|
||||
totp_verification_url: node.data.totpVerificationUrl,
|
||||
continue_on_failure: node.data.continueOnFailure,
|
||||
};
|
||||
}
|
||||
case "sendEmail": {
|
||||
|
||||
Reference in New Issue
Block a user