<action class='com.wfoxd.test.MyActionHandler'>
<nameTest>WFOXD</nameTest>
<number>123</number>
</action>
</event>
这是Action的内容:
/*
* Create date: Jul 13, 2005
* Creator: WFoxd
* Project:jBPM
* Package:com.wfoxd.test
**********************************************
**********************************************
*/package com.wfoxd.test;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
public class MyActionHandler implements ActionHandler {
/**
* Comment for <code>serialVersionUID</code>
*/ private static final long serialVersionUID = 1L;
// 在每个测试之前(setUp里面),变量isExecuted的值将全部设置为false public static boolean isExecuted = false;
//测试以下 private String nameTest;
private Integer number;
// action将设置变量isExecuted为true,所以可以在单元测试里面显示出来它是否被执行了。
public void execute(ExecutionContext executionContext) { isExecuted = true;
System.out.println(nameTest);
System.out.println(number);
}
}