calvinjiang opened a new pull request #7046:
URL: https://github.com/apache/dolphinscheduler/pull/7046


   <!--Thanks very much for contributing to Apache DolphinScheduler. Please 
review 
https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html
 before opening a pull request.-->
   
   
   ## Purpose of the pull request
   
   This PR will close the issue #7019 .
   
   ## Brief change log
   
    There are two functions to need be improved.
   First , the function 'setNextNode(Object nextNode) ' contained an 
'ClassCastException' in the class 'SwitchResultVo.java ' ,because the original 
type of the  parameter nextNode is 'Long' .
   
   Second, the function 'isTaskNodeNeedSkip(TaskNode taskNode,Map<String, 
TaskInstance> completeTaskList,DAG<String, TaskNode, TaskNodeRelation> dag) ' 
contained a bug, because the key in  the map of completeTaskList is 'taskCode', 
so need to use 'taskCode' to look for the mapping object.
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
     - *Manually verified the change by testing locally.* 
     
   1.Create a new process that contains the switch task.
   
![image](https://user-images.githubusercontent.com/4928204/143847508-7a2ad513-4e6a-49a1-8a14-2b9155e8e695.png)
   
   2.Set a global parameter named 'id' ,and its value equals 1.
   
![image](https://user-images.githubusercontent.com/4928204/143847738-e9ea1d55-154d-46d5-bc26-c590422a9b71.png)
   
   3. Set two conditions for the switch task , when '${id} == 1 ' , the lower 
task1 will be executed, when '${id} == 2' , the lower task2 will be executed.
   
![image](https://user-images.githubusercontent.com/4928204/143847897-201a8f68-770a-4ef1-934d-d41a62c95739.png)
   
   4.Then save the process and run it, you will see the results.
   When  the value of the global parameter id  equals 1.
   
![image](https://user-images.githubusercontent.com/4928204/143848364-77d43865-075c-4921-8e10-01870e52cda3.png)
   When the value of the global parameter id equals 2.
   
![image](https://user-images.githubusercontent.com/4928204/143848428-159f1241-eb60-4d65-80d5-21b661e81b97.png)
   
   
   


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


Reply via email to