BPM: decision tables tenant problem

Jmix version: 2.3.3

Create 3 tenants, and 1 users for each tenant.
Create desicion table, download it.
Login via each user, upload this decision table and deploy it.
Getting error: “FlowableException: Query return 2 results instead of max 1”

My solution:
Overriden view DecisionTableModelerView with overriden method onDeployBtnClick. Edited only this row (tenantId condition added):

DmnDecision dmnDecision = this.dmnRepositoryService.createDecisionQuery()
					.decisionTenantId(tenantId)
					.decisionKey(decisionTableKey).latestVersion().singleResult();

So decision table with same code for any number of tenants will be deployed.

Additional: In BPM process modeler create business-rule task. Click on “Decision table key” field to select decision table. There are decision tables of all tenants will be shown.
When business-process will be executed, which table will be selected? Will it be filtered by tenant?

Hello,

Thanks for the code example. We have fixed this issue. The solution will be in Jmix 2.4.

Regards,
Nikita