ruanwenjun opened a new issue #8177: URL: https://github.com/apache/dolphinscheduler/issues/8177
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When click the Gantt button, we get the error in Api server.  Error log: ```java [ERROR] 2022-01-24 18:08:46.393 org.apache.dolphinscheduler.api.exceptions.ApiExceptionHandler:[46] - encapsulation process instance gantt structure error java.lang.IllegalStateException: Duplicate key TaskDefinition{id=2, code=4299288716928, name='B', version=1, description='', projectCode=4299283992960, userId=1, taskType=SHELL, taskParams='{"resourceList":[],"localParams":[],"rawScript":"echo \"B\"\nsleep 10","dependence":{},"conditionResult":{"successNode":[],"failedNode":[]},"waitStartTimeout":{},"switchResult":{}}', taskParamList=null, taskParamMap=null, flag=YES, taskPriority=MEDIUM, userName='null', projectName='null', workerGroup='default', failRetryTimes=0, environmentCode='-1', taskGroupId='0', taskGroupPriority='0', failRetryInterval=1, timeoutFlag=CLOSE, timeoutNotifyStrategy=null, timeout=0, delayTime=0, resourceIds='', createTime=Mon Jan 24 18:03:52 CST 2022, updateTime=Mon Jan 24 18:03:52 CST 2022} at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133) at java.util.HashMap.merge(HashMap.java:1254) at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320) at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) at org.apache.dolphinscheduler.service.process.ProcessService.transformTask(ProcessService.java:2535) at org.apache.dolphinscheduler.service.process.ProcessService.genDagGraph(ProcessService.java:2439) at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689) at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$b9af762d.genDagGraph(<generated>) at org.apache.dolphinscheduler.api.service.impl.ProcessInstanceServiceImpl.viewGantt(ProcessInstanceServiceImpl.java:751) at org.apache.dolphinscheduler.api.service.impl.ProcessInstanceServiceImpl$$FastClassBySpringCGLIB$$4474b417.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689) at org.apache.dolphinscheduler.api.service.impl.ProcessInstanceServiceImpl$$EnhancerBySpringCGLIB$$a0cef787.viewGantt(<generated>) at org.apache.dolphinscheduler.api.controller.ProcessInstanceController.viewTree(ProcessInstanceController.java:371) at org.apache.dolphinscheduler.api.controller.ProcessInstanceController$$FastClassBySpringCGLIB$$1c565d9d.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) at org.apache.dolphinscheduler.api.aspect.AccessLogAspect.doAround(AccessLogAspect.java:101) ``` ### What you expected to happen no ### How to reproduce 1. Execute a workflow. 2. Click the Gantt button. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
