Skip to content

Commit

Permalink
Fix tenant-id determination
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanpelikan committed Mar 14, 2024
1 parent 89e5c4b commit d403354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected void doDeployment(
: processEngine
.getRepositoryService()
.createProcessDefinitionQuery()
.tenantIdIn(workflowModuleId))
.tenantIdIn(tenantId))
.list()
.forEach(definition -> {
// process models parsed during deployment are cached and therefore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ public void execute(
final CommandContext commandContext,
final String tenantId) {

commandContext
final var command = commandContext
.getProcessEngineConfiguration()
.getProcessEngine()
.getRuntimeService()
.createProcessInstanceByKey(configuration.getBpmnProcessId())
.businessKey(configuration.getBusinessKey())
.processDefinitionTenantId(configuration.getTenantId())
.businessKey(configuration.getBusinessKey());
(configuration.getTenantId() == null
? command.processDefinitionWithoutTenantId()
: command.processDefinitionTenantId(configuration.getTenantId()))
.execute();

}
Expand Down

0 comments on commit d403354

Please sign in to comment.