前几天看过“疯狂的菠菜”的一篇关于Jbpm中Timer的使用的博文(原文地址:[url]http://macrochen.iteye.com/blog/220085[/url]),发觉其中有一个问题:就是timer中的action不执行,郁闷了很久,现给出解决办法,供大家参考;
方法:
[b][u]去掉timer中的transition="**",在action中配置进去[/u][/b](需要在对应的action中有这个变量),如:
action代码:
方法:
[b][u]去掉timer中的transition="**",在action中配置进去[/u][/b](需要在对应的action中有这个变量),如:
<timer duedate="1 minutes" name="checkTimer1">
<action class="com.zzxy.workflow.handler.timer.TimerCheckActionHandler">
<selectTransition>上报</selectTransition>
</action>
</timer>
action代码:
public class TimerCheckActionHandler implements ActionHandler {
private String selectTransition = null;
public void execute(ExecutionContext arg0) throws Exception {
TaskInstance ti = arg0.getTaskInstance();
ti.end(selectTransition);
}
}