cancel
Showing results for 
Search instead for 
Did you mean: 

startProcessInstanceByKey not working anymore

robinho
Champ in-the-making
Champ in-the-making
Hi

I migrated from activiti explorer (community version) to alfresco activiti enterprise.
Everything went ok, but now when a process starts a new TTSProcess with the following code:

runtimeService.startProcessInstanceByKey("TTSProcess", variables); ‍


I get the following error:
org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'TTSProcess'

This works on the activiti explorer instance…but not on the enterprise

I renamed  my processes from bpmn20.xml to bpmn but with no success.

Please help me out,

thank you
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
(Moved to enterprise forum)

Renaming processes doesn't change the way its deployed.
To start a process instance by key, the process definition needs to be deployed (ie in the database). How did you do that with Alfresco Activiti?

robinho
Champ in-the-making
Champ in-the-making
I created an app (in activiti-app UI) with the processes I need.
After that, I published the app.
I can see that my app is deployed (in activiti-admin UI) and my first process starts to run.
The second process "TTSProcess" instance that I want to start is deployed (see screenshot)
I've uploaded 2 screenshots to show it.

http://imgur.com/1lvfmv9
http://imgur.com/ZUObLYT

The activiti engine still doesn't want to start up my TTSProcess by key… What is the reason he cannot find it?
<code>org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'TTSProcess'</code>

Note: I'm using an H2 database
Also important: startProcessInstanceByID works

jbarrez
Star Contributor
Star Contributor
Hmm; I see tenant_1 in that screenshot. Are you running multi tenant setup?
Anyhow, I believe it will work once you pass in the 'tenant_1' tenant id in the startProcessInstanceByKey

robinho
Champ in-the-making
Champ in-the-making
Hi
I'm not running a multi tenant setup
"
Good After date:20150228
Good Before date:20180630
Multi tenant?:false
Default tenant name:mycompany.com
"

I tried with the following method and it worked! (thanks for the tip)
<code>runtimeService.startProcessInstanceByKeyAndTenantId("TTSProcess", myvariables, "tenant_1"); </code>

jbarrez
Star Contributor
Star Contributor
Great to hear! The reason is that in the BPM Suite everything is multi tenant (even if it's not according to the license), so it's possible (theoretically, haven't tried it yet) to migrate to MT later on.