deanwong opened a new pull request #4372:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4372


   ## What is the purpose of the pull request
   
   Could pass global param values when starting a new process instance.
   The main idea is to merge the start param values into the new process 
instance's global params.
   
   ## Brief changelog
   
      - add optional param for start-process-instance api
      - reuse command_param in command table for persistence
      - overload curingGlobalParams function in ParameterUtils
      - not adapt the UI code yet
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
   
     -  Added test case in ParameterUitlsTest
     -  Added test case in ProcessServiceTest to verify the start param value 
could be  merged into new process instance's global params
     - Manually verified the start-process-instance API by testing locally
   
   The test process definition json as below 
   
`{"globalParams":[{"prop":"tenant_id","direct":"IN","type":"VARCHAR","value":""}],"tasks":[{"type":"SHELL","id":"tasks-62232","name":"echo","params":{"resourceList":[],"localParams":[],"rawScript":"echo
 
${tenant_id}"},"description":"","runFlag":"NORMAL","conditionResult":{"successNode":[""],"failedNode":[""]},"dependence":{},"maxRetryTimes":"0","retryInterval":"1","delayTime":"0","timeout":{"strategy":"","interval":null,"enable":false},"waitStartTimeout":{},"taskInstancePriority":"MEDIUM","workerGroup":"default","preTasks":[]}],"tenantId":2,"timeout":0}`
   
![ds-pull-01](https://user-images.githubusercontent.com/4144156/103604390-e8b13080-4f4b-11eb-8d4c-eac9eac311c1.png)
   
![ds-pull-02](https://user-images.githubusercontent.com/4144156/103604442-0ed6d080-4f4c-11eb-8adc-7762654fee5d.png)
   
![ds-pull-03](https://user-images.githubusercontent.com/4144156/103605119-01bae100-4f4e-11eb-8f82-b0ceb91c95d9.png)
   
   One question here?
   Do I need to modify the ProcessInstanceJson as well? But I did not find 
anything wrong even add multiple tasks with global param. Please give me some 
suggestions.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to