How to set tenant id with FormService


#1

hello everyone,i need help, my english is poor ,so i hope you can see what i mean

1,my destination is query task use assignee name and tenant id;
2,task’s tenandId from processInstance’s tenantId right? (the task from theprocessInstance)
3,i create process instance use form service like this:
“ProcessInstance processInstance = formService.submitStartFormData(processDefinitionId, parmas)”,
i can not set tenant id.
4,i create process instance use runtime service like this:
“ProcessInstance processInstance =
runtimeService.startProcessInstanceByKeyAndTenantId(processDefinitionKey, params, tenantId);”
use this method i can set tenant id.

my problem:
1,how to set tenantId use formService ?
2,what is the different with “3” and “4” ?(except tenandId)

i hope some one can help me,thanks,best wishes!


#2

Hi,

formService.submitStartFormData(processDefinitionId, parmas)

starts the process instance and tenantId is taken from processDefintion.

There is no formService method to allow that. Use runtimeService to force tenantId on the process instance start.

Regards
Martin


#3

Hi, i am very happy you answered this question. It is very useful to me and solved my problem, i am a beginner of flowable , thanks for your guide. Wish you a happy day :)


#4

Hi, i am very happy you answered this question. It is very useful to me and solved my problem, i am a beginner of flowable , thanks for your guide. Wish you a happy day :)