Community

Setting superProcessToken results in to error :ERROR [STDERR] org.jbpm.JbpmException: couldn't signal without specifying a leaving transition : transition is null

reply from Shashwat Gaur in jBPM - View the full discussion

Thanks Alejandro for your prompt reply. Yes you are correct that subprocess instance automatically sets the superprocess token. In my case if either I set the superprocess token or i use the 'createSubProcessInstance' to create the subprocess which automatically sets the super process token i get this error. Please have a look at the following code snippet, I am using in my work flow:

 

 

public void execute(ExecutionContext executionContext) throws Exception {

 

            processName = getProcessName();
                              
            ProcessDefinition processDefinition = ManagedJbpmContext.instance().getGraphSession().findLatestProcessDefinition(processName);

            ProcessInstance pi = executionContext.getToken().createSubProcessInstance(processDefinition);

          Task task = ProcessUtil.getStartTask(pi.getProcessDefinition());

 

 

            Map<String, Object> values = extractCallerData(executionContext,
                    task);
            TaskInstance ti = ProcessUtil.initializeProcess(pi, task, values,
                    false);

 

            if (ti != null) {
                // setup the swimlane instance
                Swimlane s = ti.getTask().getSwimlane();
                if (s != null) {
                    String assignment = s.getPooledActorsExpression();
                    if (!Strings.isEmpty(assignment)) {
                        ti.getSwimlaneInstance().setPooledActors(
                                assignment.split(","));
                    }

 

                    ti.end();
                }
            }

}

Reply to this message by going to Community

Start a new discussion in jBPM at Community