no processes deployed with key 'XYZ'

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2016 12:21 PM
I have the following function in a java class called to crate a Process XYZ. It goes fine for the first time and creates the process. The key is XYZ. When called again i get a error
no processes deployed with key 'XYZ'. My BPMn sxml and the java code is given below. What could be the issue?
no processes deployed with key 'XYZ'. My BPMn sxml and the java code is given below. What could be the issue?
<process id="XZY" name="XYZ Process" isExecutable="true"> <startEvent id="startevent1" name="Start"></startEvent> <serviceTask id="CreateTask" name="Create Task" activiti:async="true" activiti:expression="${TaskManager.createTask(execution.getId())}"></serviceTask> <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="CreateTask"></sequenceFlow> <endEvent id="endevent1" name="End"></endEvent> <sequenceFlow id="flow2" sourceRef="CreateTask" targetRef="endevent1"></sequenceFlow> </process>
protected ProcessInstance initProcessInstance(String processKey, Map variables) { System.out.println("1. Inside initProcessInstance for " + processKey); ProcessInstance processInstance = null; System.out.println("2. Inside initProcessInstance for " + processKey); RuntimeService runTimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService(); System.out.println("3. Inside initProcessInstance for " + runTimeService); if (variables == null) { System.out.println("4. Inside initProcessInstance for " + variables); processInstance = runTimeService.startProcessInstanceByKey(processKey); } else { System.out.println("5. Inside initProcessInstance for " + variables); processInstance = runTimeService.startProcessInstanceByKey(processKey, variables); } System.out.println("6. Inside initProcessInstance for " + variables); return processInstance; }
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2016 01:46 PM
The issue was that the process definition was not deployed. I am using this from spring boot. After i deployed the process deifnition to the repository, it can find and recreate the process instance, but i see an issue here.
I can see the processinfo ins the "act_re_procdef" table, but when i try to print the definition id, name, key and version, i get only the definition id others are null.
<code>
processInstance.getProcessDefinitionId();
processInstance.getProcessDefinitionName();
processInstance.getProcessDefinitionVersion();
</code>
I can see the processinfo ins the "act_re_procdef" table, but when i try to print the definition id, name, key and version, i get only the definition id others are null.
<code>
processInstance.getProcessDefinitionId();
processInstance.getProcessDefinitionName();
processInstance.getProcessDefinitionVersion();
</code>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 04:59 AM
The version should not be null for sure. How are you fetching this process instance? Did you check what you get back when you query for process definitions directly instead of going via the process instance?
