penggeyuanlishe commented on issue #14397: URL: https://github.com/apache/dolphinscheduler/issues/14397#issuecomment-1602397597
https://github.com/apache/dolphinscheduler/pull/14398 上述方案思路如下: 查看任务定义页面的接口:  找到对应源码,发现该接口的 taskExecuteType 有默认值,为 "BATCH":  继续跟踪源码,找到对应的SQL语句:  由于 taskExecuteType 有默认值"BATCH",不会为空,所以`and td.task_execute_type = #{taskExecuteType.code}`该代码将会执行。到数据库一看,刚才导入的工作流对应的 task_execute_type 果然为空:  排查原因,发现在 org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl#checkAndImport 方法中, org.apache.dolphinscheduler.dao.entity.TaskDefinitionLog 类的构造方法,未将该值赋值进去,所以导致 TaskDefinitionLog 对象中的 taskExecuteType 并未赋值,因此存入数据库中即为 null 。  于是,解决方案便是修改该构造方法:  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
