Skip to content

Commit

Permalink
Merge branch 'feat/workflow-continue-on-error' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh committed Dec 6, 2024
2 parents ba77fa4 + b5055dd commit 83e83d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion web/app/components/workflow/hooks/use-workflow-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ export const useWorkflowRun = () => {
const currentNode = draft.find(node => node.id === data.node_id)!
currentNode.data._runningStatus = data.status as any
if (data.status === NodeRunningStatus.Exception) {
currentNode.data._runningBranchId = ErrorHandleTypeEnum.failBranch
if (data.execution_metadata.error_strategy === ErrorHandleTypeEnum.failBranch)
currentNode.data._runningBranchId = ErrorHandleTypeEnum.failBranch
}
else {
if (data.node_type === BlockEnum.IfElse)
Expand Down
14 changes: 10 additions & 4 deletions web/app/components/workflow/run/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,16 @@ const StatusPanel: FC<ResultProps> = ({
<>
<div className='my-2 h-[0.5px] bg-divider-subtle'/>
<div className='system-xs-regular text-text-destructive'>{error}</div>
<div className='my-2 h-[0.5px] bg-divider-subtle'/>
<div className='system-xs-regular text-text-destructive'>
{t('workflow.nodes.common.errorHandle.partialSucceeded.tip', { num: exceptionCounts })}
</div>
{
!!exceptionCounts && (
<>
<div className='my-2 h-[0.5px] bg-divider-subtle'/>
<div className='system-xs-regular text-text-destructive'>
{t('workflow.nodes.common.errorHandle.partialSucceeded.tip', { num: exceptionCounts })}
</div>
</>
)
}
</>
)}
{
Expand Down
1 change: 1 addition & 0 deletions web/types/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export type NodeFinishedResponse = {
iteration_index?: number
iteration_id?: string
parallel_mode_run_id: string
error_strategy?: ErrorHandleTypeEnum
}
created_at: number
files?: FileResponse[]
Expand Down

0 comments on commit 83e83d7

Please sign in to comment.