You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/05/28 13:41:20 UTC

[GitHub] [dolphinscheduler] gk0916 commented on a change in pull request #5554: [Fix-5477][api] when start a process manually, its local parameter which references ${system.datetime} does not get runtime value

gk0916 commented on a change in pull request #5554:
URL: https://github.com/apache/dolphinscheduler/pull/5554#discussion_r641559193



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java
##########
@@ -621,23 +621,24 @@ private void setProcessInstance(ProcessInstance processInstance, Tenant tenant,
             throw new RuntimeException("workflow instance is null");
         }
 
+        Date scheduleTime = processInstance.getScheduleTime();
         Map<String, String> timeParams = BusinessTimeUtils
                 .getBusinessTime(processInstance.getCmdTypeIfComplement(),
-                        processInstance.getScheduleTime());
+                        scheduleTime !=null ? scheduleTime : processInstance.getStartTime());

Review comment:
       Thanks, but i have a process define that has three jobs, and every job write data to mysql and use timestamp(${system.datetime}) as versioncode. sometime, i need manual execute this process to update to fix datas. after that when i want verify these three job instances have the same timestamp same as versioncode in mysql, go to view parameters page that will display current timestamp that does not same as versioncode. And this is true problem in my work, how to resolve it? maybe a processinstance should have a runtime timestamp only one?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org