cancel
Showing results for 
Search instead for 
Did you mean: 

no processes deployed with key 'XYZ'

ad1
Champ in-the-making
Champ in-the-making
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?


<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;
   }

2 REPLIES 2

ad1
Champ in-the-making
Champ in-the-making
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>


jbarrez
Star Contributor
Star Contributor
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?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.