jbpm4中moveto的源代码:
public class ExecutionImpl extends ScopeInstanceImpl implements ClientProcessInstance,
ActivityExecution, EventListenerExecution {
...
/** persistent activity reference */
protected String activityName;
...
public void moveTo(ActivityImpl destination) {
// move the execution to the destination
setActivity(destination);
transition = null;
}
...
public void setActivity(ActivityImpl activity) {
this.activity = activity;
if (activity!=null) {
this.activityName = activity.getName();
}
else {
this.activityName = null;
}
}
}
从源代码来看ExecutionImpl.只是把executionimpl的activityName重新赋值.
如果运行的moveto方法的环境是在事务环境内(如放在用户自定义的命令中或者整合ssh后在spring的事务拦截范围内),则对应的结果就是,jbpm4中的jbpm4_execution表的ACTIVITYNAME_字段设置成activityName.
如果运行的moveto方法的环境是不在事务环境内(如在自己写的TestCase中调用),则什么不发生,因为没有持久化.
现在设计流程定义如下:
开始->task1->task2->task3->end (参与者分别为task1:user1,task2:user2,task3:user3)
经过测试发现在事务环境内运行,当前流程实例的活动节点在task3时,获取executionIpml,调用executionIpml.moveto(),参数传入ActivityImpl,moveTo到task1.
我希望的结果是当前活动节点为task1,用户user1的taskService.findPersonalTasks("user1")能找到任务,但是事实是user1的代办列表找不到任务.而用户user3的taskService.findPersonalTasks("user1")能找到任务.
查看jbpm4的数据库,会发现,除了jbpm4中的jbpm4_execution表的ACTIVITYNAME_字段设置成task1,其他包括jbpm4_task和所有历史相关字段都没有改变.
分享到:
相关推荐
VTK 10 Managing Pipeline__ Execution.pdf VTK 10 Managing Pipeline__ Execution.pdf VTK 10 Managing Pipeline__ Execution.pdf
Vectorization vs. Compilation in Query Execution.pdf
LabVIEW.2009.v9.0.Desktop.Execution.Trace.Toolkit.ISO-TBE-keygen
Created by Yuntao Qiang, for OS Class. Pls feel free to use this resource
Win through execution.pptx
This is good project on Detecting Windows NT/2K process execution.
Creating a Culture of Execution.ppt
Can Webplan Reconcile Planning and Execution.doc
Harden_Android_Programmers'_toolkit_with_Symbolic_Execution.pdf
数字化转型战略的敏捷执行,通过设计、架构、确定优先级,首先商业成功
sap press doc 解压密码:abap_developer
Product Study Test Case Creation Testing Environment Setup Test Execution Closing
Java AOP 切点表达式,这个表达式表明了你要在哪个方法或哪些方法织入切面。方法表达式以“*”号开始,表明了我们不关心方法返回值的类型。
leifwright_blog_cmd_execution
knowledge_builder_code_execution
罗克韦尔MES系统中生产执行的介绍及使用说明,包含页面布局,各个类型的操作界面,生产过程数据的记录,工作流等,以及物料的车间相关操作
In this talk, we would like to present ... By leveraging the well-established technique of symbolic execution, this project aims to harden Android programmers' toolkit with much advanced testing tools
RPA之家转载的AA视频教程,欢迎大家下载学习,如果有问题也可以进入RPA之家一起交流RPA,或者在评论区评论也可以。