Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用并行和排他网关组合的时候会卡在running状态 #112

Open
FJiayang opened this issue Oct 16, 2024 · 0 comments
Open

使用并行和排他网关组合的时候会卡在running状态 #112

FJiayang opened this issue Oct 16, 2024 · 0 comments

Comments

@FJiayang
Copy link

FJiayang commented Oct 16, 2024

问题描述

流程配置如图
image

ProcessInstance启动后,检查流程状态,发现卡在join Gateway位置,是什么原因呢?

环境:

  • springboot 3.3.4
  • jdk 17
  • smartengine 3.0.0
    @Test
    public void parallel() throws Exception{
        PersisterSession.create();
        RepositoryCommandService repositoryCommandService = smartEngine.getRepositoryCommandService();
        ProcessDefinition processDefinition = repositoryCommandService
                .deploy("smart-engine/deploy.bpmn").getFirstProcessDefinition();
        Map<String, Object> request = new HashMap<>();
        request.put("deploy3", "true");
        ProcessCommandService processCommandService = smartEngine.getProcessCommandService();
        ProcessInstance instance = processCommandService.start(processDefinition.getId(), processDefinition.getVersion(), request);
        List<ExecutionInstance> executionInstances = itsTradePipelineService.query(instance.getInstanceId());
        for (ExecutionInstance executionInstance : executionInstances) {
            log.info("executionInstance:{}", executionInstance);
        }
        PersisterSession.destroySession();
    }

输出

2024-10-16T17:37:45.814+08:00  INFO 20039 --- [springboot-smartengine] [pool-2-thread-2] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:37:45.814+08:00  INFO 20039 --- [springboot-smartengine] [pool-2-thread-1] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:37:45.815+08:00  INFO 20039 --- [springboot-smartengine] [pool-2-thread-3] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:37:45.815+08:00  INFO 20039 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:3c454bc2-c898-446a-a29c-cc6844ed71eb:Gateway_join:true
2024-10-16T17:37:45.815+08:00  INFO 20039 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:00bad57d-ed0c-498c-ab7e-f0387901c117:Gateway_join:true

预期输出应该所有任务都是完成状态

排查过程

移除排他网关运行正常

当移除排他网关后,流程正常结束
image

输出如下

2024-10-16T17:41:15.884+08:00  INFO 20662 --- [springboot-smartengine] [pool-2-thread-1] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:41:15.884+08:00  INFO 20662 --- [springboot-smartengine] [pool-2-thread-2] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:41:15.884+08:00  INFO 20662 --- [springboot-smartengine] [pool-2-thread-3] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:41:15.884+08:00  INFO 20662 --- [springboot-smartengine] [pool-2-thread-2] t.f.s.s.task.DeployEndTask               : DeployEndTask

移除排他网关后运行多次偶发卡死在join gateway

    @Test
    @RepeatedTest(10)
    public void parallel() throws Exception{
        PersisterSession.create();
        ...
        PersisterSession.destroySession();
    }

移除排他网关后,重复运行10次单测,除了第1、2次正常结束,后续8次都会卡在join gateway,输出如下

2024-10-16T17:43:53.708+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.708+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.709+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-4] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:43:53.709+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-6] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:43:53.709+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-5] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:43:53.709+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-5] t.f.s.s.task.DeployEndTask               : DeployEndTask
2024-10-16T17:43:53.715+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.715+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.716+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-7] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:43:53.716+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-8] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:43:53.716+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-9] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:43:53.716+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-9] t.f.s.s.task.DeployEndTask               : DeployEndTask
2024-10-16T17:43:53.720+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.720+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.720+08:00  INFO 21122 --- [springboot-smartengine] [ool-2-thread-10] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:43:53.720+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-2] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:43:53.720+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-1] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:43:53.720+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:2210f60e-6ce4-4460-9f7e-6a5afa1b8cc9:Gateway_join:true
2024-10-16T17:43:53.722+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:e735dacc-8ab2-4483-ba70-643196f6d06d:Gateway_join:true
2024-10-16T17:43:53.722+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:b0b4f9d1-6f2d-49d9-ae30-c7a0d6a8023c:Gateway_join:true
2024-10-16T17:43:53.725+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.725+08:00  WARN 21122 --- [springboot-smartengine] [           main] .e.d.i.DefaultProcessDefinitionContainer :  Duplicated processDefinitionId and version found for unique key Process_01uha9y:1.0.0 , but it's ok for deploy the process definition repeatedly. BUT this message should be NOTICED. 
2024-10-16T17:43:53.725+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-3] t.f.s.s.task.Deploy1Task                 : Deploy1Task
2024-10-16T17:43:53.725+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-6] t.f.s.s.task.Deploy3Task                 : Deploy3Task
2024-10-16T17:43:53.725+08:00  INFO 21122 --- [springboot-smartengine] [pool-2-thread-4] t.f.s.s.task.Deploy2Task                 : Deploy2Task
2024-10-16T17:43:53.725+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:6d6bb5ca-c98f-48d7-9c92-4c8f218c445d:Gateway_join:true
2024-10-16T17:43:53.725+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:7a580140-3d2b-4cc4-b228-fbcf60fecf3a:Gateway_join:true
2024-10-16T17:43:53.726+08:00  INFO 21122 --- [springboot-smartengine] [           main] t.f.s.s.s.ItsTradePipelineServiceTest    : executionInstance:f2ea21df-4626-48ab-95bf-60d7151c5fe2:Gateway_join:true
...
@FJiayang FJiayang changed the title 使用并行网关的时候会卡在running状态 使用并行和排他网关组合的时候会卡在running状态 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant