No Process Deployed with the key

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 07:33 AM
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 !!!
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 !!!
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 08:21 AM
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"
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"
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 08:42 AM
Hi,
try :
regards
Martin
try :
processInstance = runtimeService.startProcessInstanceByKey("Process_1",variableMap);
regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 11:59 PM
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 ??
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 ??
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 05:24 AM
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)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2016 04:33 AM
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 ??
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 ??
