cancel
Showing results for 
Search instead for 
Did you mean: 

CallActivityBehavior can not found process with NO_TENANT_ID

sunshare
Champ in-the-making
Champ in-the-making
Hey,

I have a question about line 69 on CallActivityBehavior.java.


       processDefinition = Context
             .getProcessEngineConfiguration()
             .getDeploymentManager()
             .findDeployedLatestProcessDefinitionByKey(processDefinitonKey);


The above code seems that can only find the process define in NO_TENANT_ID which is "", but not search for any tenant. Is this a bug or just designed like this?

For example, I have a process called "key1" defined in "google.com" tenant. The code will not find my process. But if the process is define in "" tenant. It will find it.

Thank you,
Lesong
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
Which version are you looking at? I see something different in the latest version: https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/main/java/org/activiti/...

sunshare
Champ in-the-making
Champ in-the-making
Thanks for your response.

I am using
<code>
compile group: 'org.activiti', name: 'spring-boot-starter-basic', version: '5.17.0'
compile group: 'org.activiti', name: 'spring-boot-starter-actuator', version: '5.17.0'
compile group: 'org.activiti', name: 'spring-boot-starter-jpa', version: '5.17.0'
</code>

The line number was wrong. Should be line 78 in the link you provided. Sorry for the confusion.

jbarrez
Star Contributor
Star Contributor
Why 5.17 … that's over a year old, much has changed since! Chances are high that this bug is fixed too.

sunshare
Champ in-the-making
Champ in-the-making
I tried with 5.19.0.2. And I got the same issue.

Just to be clear, I have a processA with a CallActivity which calls processB. My processA is defined in NO_TENANT_ID. And my processB is defined in tenant "blah.com". And when I executed processA, when it tries to find processB processDef, it complains that can not found processB.

sunshare
Champ in-the-making
Champ in-the-making
Okay, thanks for pointing that out. I think we started on mid 2015. And we never upgrade the version since it is all working well. But recently, we need to expend our model to handle paging CallActivities. I will try the newest version.

Thanks

jbarrez
Star Contributor
Star Contributor
"My processA is defined in NO_TENANT_ID. And my processB is defined in tenant "blah.com"."

Process definitions are tenant based and can _not_ call each other. That would defeat the purpose of tenancy.

sunshare
Champ in-the-making
Champ in-the-making
Thanks for your clarification.

So, what is the purpose of line 77 and 78 on CallActivityBehavior.java? My understanding is if is NO_TENANT_ID, then findDeployedLatestProcessDefinitionByKey(key) in all the tenants.

If my understanding is wrong, is there a concept of "global tenant" which can be access by any tenant? Since my processA is a template process which can be used for all tenants, I want to avoid publishing this template process for every tenant.

jbarrez
Star Contributor
Star Contributor
The purpose of that line is that tenantId are 'inherited'. Once something has a tenantId, everything that spins off from it gets the same tenantId.

There is not concept of a gobal tenant in Activiti, sorry.