[Fix-10049] Conditions Task branch flow failed (#10077)
(cherry picked from commit 225cb332d1)
This commit is contained in:
parent
63ab98e67f
commit
98576cb509
|
|
@ -47,7 +47,7 @@ Go to the workflow definition page, and then create the following task nodes:
|
|||
|
||||
After you finish creating the workflow, you can run the workflow online. You can view the execution status of each task on the workflow instance page. As shown below:
|
||||
|
||||

|
||||

|
||||
|
||||
In the above figure, the task status marked with a green check mark is the successfully executed task node.
|
||||
|
||||
|
|
@ -58,3 +58,4 @@ In the above figure, the task status marked with a green check mark is the succe
|
|||
- The predecessor task of Conditions cannot connect to its branch nodes, which will cause logical confusion and does not conform to DAG scheduling. The situation shown below is **wrong**.
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Conditions 是一个条件节点,根据上游任务运行状态,判断应该
|
|||
|
||||
当完成创建工作流之后,可以上线运行该工作流。在工作流实例页面可以查看到各个任务的执行状态。如下图所示:
|
||||
|
||||

|
||||

|
||||
|
||||
上图中,任务状态标记为绿色对号的,即为成功执行的任务节点。
|
||||
|
||||
|
|
@ -58,3 +58,4 @@ Conditions 是一个条件节点,根据上游任务运行状态,判断应该
|
|||
- Conditions 的前置任务不能连接其分支节点,会造成逻辑混乱,不符合 DAG 调度。如下图所示的情况是**错误**的。
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
|
|
@ -1376,10 +1376,16 @@ public class WorkflowExecuteThread {
|
|||
if (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) {
|
||||
return DependResult.NON_EXEC;
|
||||
}
|
||||
// ignore task state if current task is condition and block
|
||||
if (taskNode.isConditionsTask() || taskNode.isBlockingTask()) {
|
||||
// ignore task state if current task is block
|
||||
if (taskNode.isBlockingTask()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// always return success if current task is condition
|
||||
if (taskNode.isConditionsTask()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!dependTaskSuccess(depsNode, taskCode)) {
|
||||
return DependResult.FAILED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ConditionTaskProcessor extends BaseTaskProcessor {
|
|||
}
|
||||
this.setTaskExecutionLogger();
|
||||
initTaskParameters();
|
||||
logger.info("dependent task start");
|
||||
logger.info("condition task start");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -170,8 +170,7 @@ public class ConditionTaskProcessor extends BaseTaskProcessor {
|
|||
logger.info("depend item : {} expect status: {}, actual status: {}", item.getDepTaskCode(), item.getStatus(), executionStatus);
|
||||
dependResult = DependResult.FAILED;
|
||||
}
|
||||
logger.info("dependent item complete {} {},{}",
|
||||
Constants.DEPENDENT_SPLIT, item.getDepTaskCode(), dependResult);
|
||||
logger.info("dependent item complete, dependentTaskCode: {}, dependResult: {}", item.getDepTaskCode(), dependResult);
|
||||
return dependResult;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -822,6 +822,7 @@ const project = {
|
|||
sea_tunnel_queue: 'Queue',
|
||||
sea_tunnel_master_url_tips:
|
||||
'Please enter the master url, e.g., 127.0.0.1:7077',
|
||||
add_pre_task_check_condition: 'Add pre task check condition',
|
||||
switch_condition: 'Condition',
|
||||
switch_branch_flow: 'Branch Flow',
|
||||
and: 'and',
|
||||
|
|
|
|||
|
|
@ -811,6 +811,7 @@ const project = {
|
|||
sea_tunnel_master_url: 'Master URL',
|
||||
sea_tunnel_queue: '队列',
|
||||
sea_tunnel_master_url_tips: '请直接填写地址,例如:127.0.0.1:7077',
|
||||
add_pre_task_check_condition: '添加前置检查条件',
|
||||
switch_condition: '条件',
|
||||
switch_branch_flow: '分支流转',
|
||||
and: '且',
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ export function useConditions(model: { [field: string]: any }): IJsonItem[] {
|
|||
]
|
||||
},
|
||||
childrenField: 'dependItemList',
|
||||
name: 'custom_parameters'
|
||||
name: 'add_pre_task_check_condition'
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue