예제 #1
0
        public virtual void testStartProcessInstanceWithVersionTagBinding()
        {
            // given
            BpmnModelInstance callingProcess = createCallingProcess("callingProcess", "ver_tag_1");

            deploymentForTenant(TENANT_ONE, callingProcess);
            deploymentForTenant(TENANT_ONE, "org/camunda/bpm/engine/test/bpmn/callactivity/subProcessWithVersionTag.bpmn20.xml");
            deploymentForTenant(TENANT_TWO, callingProcess);
            deploymentForTenant(TENANT_TWO, "org/camunda/bpm/engine/test/bpmn/callactivity/subProcessWithVersionTag2.bpmn20.xml");

            // when
            runtimeService.createProcessInstanceByKey("callingProcess").processDefinitionTenantId(TENANT_ONE).execute();
            runtimeService.createProcessInstanceByKey("callingProcess").processDefinitionTenantId(TENANT_TWO).execute();

            // then
            ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processDefinitionKey("subProcess");

            assertThat(query.activityIdIn("Task_1").tenantIdIn(TENANT_ONE).count(), @is(1L));
            assertThat(query.activityIdIn("Task_2").tenantIdIn(TENANT_TWO).count(), @is(1L));
        }