当前位置:编程学习 > JAVA >>

各位大哥大姐帮我解决一下JBPM4.4的一个问题了 刚学习的

总是报这样的错 不知道为什么
org.jbpm.api.JbpmException: No unnamed transitions were found for the task 'task'


我把代码给你们看看
package com.family168;

import junit.framework.TestCase;
import org.jbpm.api.*;
import java.util.*;

public class ProcessInstanceTest extends TestCase {
ProcessEngine processEngine;
private String id;
public ProcessInstanceTest() {
processEngine = Configuration.getProcessEngine();
}

protected void setUp() {
id = processEngine.getRepositoryService().createDeployment()
.addResourceFromClasspath("helloworld.jpdl.xml").deploy();
}

public void testProcessInstance() {

//发布流程实例
ExecutionService executionService = processEngine.getExecutionService();

//启动实例
ProcessInstance pi = executionService.startProcessInstanceByKey("helloworld");
System.out.println(pi);
System.out.println(pi.isEnded());


pi = executionService.signalExecutionById(pi.getId());
System.out.println(pi.isEnded());
}



 

红色代码这一块代码有问题  删了就没有问题了  但这一句是让流程实例继续往下执行的 不知道为什么总是报上面的错

 

我把配置文件   helloworld.jpdl.xml 给你们看看

 

 

<?xml version="1.0" encoding="UTF-8"?>

<process name="helloworld" xmlns="http://jbpm.org/4.3/jpdl">
   <start g="123,44,48,48" name="start1">
      <transition g="-59,-17" name="to state1" to="task"/>
   </start>
   <end g="118,382,48,48" name="end1"/>
  
   <task candidate-groups="dev" g="103,174,92,52" name="task">
      <transition g="-47,-17" name="to task" to="end1"/>
   </task>
 
 
</process>

 

 

这是很简单的小例子就是发现不了哪里有问题

 

大家知道帮帮我了 万分感谢
--------------------编程问答-------------------- 我也遇到了,顶一下 --------------------编程问答-------------------- 这里应该是state不是task --------------------编程问答-------------------- 同意2楼的:这里应该是state不是task --------------------编程问答--------------------
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,