Browse Source

When the workflow definition is copied, the operation user of the timed instance is changed to the current user. (#12400)

Kerwin 2 years ago
parent
commit
fccbe5593a

+ 1 - 0
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java

@@ -2197,6 +2197,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
                 Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode);
                 if (scheduleObj != null) {
                     scheduleObj.setId(null);
+                    scheduleObj.setUserId(loginUser.getId());
                     scheduleObj.setProcessDefinitionCode(processDefinition.getCode());
                     scheduleObj.setReleaseState(ReleaseState.OFFLINE);
                     scheduleObj.setCreateTime(date);