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,
|
maxRetries: data.maxRetries,
|
||||||
maxStepsOverride: data.maxStepsOverride,
|
maxStepsOverride: data.maxStepsOverride,
|
||||||
allowDownloads: data.allowDownloads,
|
allowDownloads: data.allowDownloads,
|
||||||
|
continueOnFailure: data.continueOnFailure,
|
||||||
downloadSuffix: data.downloadSuffix,
|
downloadSuffix: data.downloadSuffix,
|
||||||
errorCodeMapping: data.errorCodeMapping,
|
errorCodeMapping: data.errorCodeMapping,
|
||||||
totpVerificationUrl: data.totpVerificationUrl,
|
totpVerificationUrl: data.totpVerificationUrl,
|
||||||
@@ -333,6 +334,24 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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 items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Label className="text-xs font-normal text-slate-300">
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export type TaskNodeData = {
|
|||||||
parameterKeys: Array<string>;
|
parameterKeys: Array<string>;
|
||||||
totpVerificationUrl: string | null;
|
totpVerificationUrl: string | null;
|
||||||
totpIdentifier: string | null;
|
totpIdentifier: string | null;
|
||||||
|
continueOnFailure: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TaskNode = Node<TaskNodeData, "task">;
|
export type TaskNode = Node<TaskNodeData, "task">;
|
||||||
@@ -36,6 +37,7 @@ export const taskNodeDefaultData: TaskNodeData = {
|
|||||||
parameterKeys: [],
|
parameterKeys: [],
|
||||||
totpVerificationUrl: null,
|
totpVerificationUrl: null,
|
||||||
totpIdentifier: null,
|
totpIdentifier: null,
|
||||||
|
continueOnFailure: false,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isTaskNode(node: Node): node is TaskNode {
|
export function isTaskNode(node: Node): node is TaskNode {
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ function convertToNode(
|
|||||||
parameterKeys: block.parameters.map((p) => p.key),
|
parameterKeys: block.parameters.map((p) => p.key),
|
||||||
totpIdentifier: block.totp_identifier ?? null,
|
totpIdentifier: block.totp_identifier ?? null,
|
||||||
totpVerificationUrl: block.totp_verification_url ?? null,
|
totpVerificationUrl: block.totp_verification_url ?? null,
|
||||||
|
continueOnFailure: block.continue_on_failure,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -518,6 +519,7 @@ function getWorkflowBlock(
|
|||||||
parameter_keys: node.data.parameterKeys,
|
parameter_keys: node.data.parameterKeys,
|
||||||
totp_identifier: node.data.totpIdentifier,
|
totp_identifier: node.data.totpIdentifier,
|
||||||
totp_verification_url: node.data.totpVerificationUrl,
|
totp_verification_url: node.data.totpVerificationUrl,
|
||||||
|
continue_on_failure: node.data.continueOnFailure,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "sendEmail": {
|
case "sendEmail": {
|
||||||
|
|||||||
Reference in New Issue
Block a user