cancel
Showing results for 
Search instead for 
Did you mean: 

No Process Deployed with the key

chandanmb1
Champ on-the-rise
Champ on-the-rise
Hello All,

I have attached the bpmn modeller (diagram.txt).
Now i am trying to insert the same bpmn xml to the activiti database. I am getting an error. "No process deployed with the key myProcess".

                Variable s is the complete bpmn xml present in attached file.
                Deployment deploy = repositoryService.createDeployment().addString("myProcess", s).deploy();
      System.out.println("Deployment:::::::::::::"+deploy);
      Map<String, Object> variableMap = new HashMap<String, Object>();
      runtimeService = processEngine.getRuntimeService();
      processInstance = runtimeService.startProcessInstanceByKey("myProcess",variableMap);

Please help !!!
5 REPLIES 5

chandanmb1
Champ on-the-rise
Champ on-the-rise
Initially when the Bpmn got generated Id was different and if i deploy the same. Activiti works.
But fails when i change the id manually

In this file, i renamed it in 2 places
process id=\"myProcess\"
<bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"myProcess\">\n"



martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
try :
processInstance = runtimeService.startProcessInstanceByKey("Process_1",variableMap);
regards
Martin

Thanks Martin.
But if you see my second comment.
I am changing the process id from "Process_1" to "myProcess" and then i am calling like as you shown.
But its not working.
processInstance = runtimeService.startProcessInstanceByKey("myProcess",variableMap);

Why ??

jbarrez
Star Contributor
Star Contributor
Use addString("myProcess.bpmn20.xml", s), add the .bpmn20.xml suffix. It needs to know that you're deploying a process definition (and not a rule for example)

chandanmb1
Champ on-the-rise
Champ on-the-rise
Ok sure i will try that.
But why it is not working when i just changed the Process Id from Process_1 to myProcess.
Is it something wong what i am doing ??