LD is tigger forever,CG are not brothers forever, throw the pot and shine forever.
Modesty is not false, solid is not naive, treacherous but not deceitful, stay with good people, and stay away from poor people.
talk is cheap, show others the code and KPI, Keep progress,make a better result.
Survive during the day and develop at night。
目录
概 述
个人任务分配:
式一:直接流程图配置中写死
/**
* 启动流程实例
*/
@Test
public void start(){
Map<String,Object> variables=new HashMap<String,Object>();
variables.put("userId", "张三");
ProcessInstance pi=processEngine.getRuntimeService() // 运行时Service
.startProcessInstanceByKey("studentLevaeProcess6",variables); // 流程定义表的KEY字段值
System.out.println("流程实例ID:"+pi.getId());
System.out.println("流程定义ID:"+pi.getProcessDefinitionId());
}
TaskListener 监听实现
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
public class MyTaskListener implements TaskListener {
public void notify(DelegateTask delegateTask) {
delegateTask.setAssignee("李四");
}
}
小结
参考资料和推荐阅读
1.链接: 参考资料.
本文介绍了在Activiti5中如何进行流程控制,包括个人任务分配的直接配置方式,以及通过TaskListener监听实现任务分配。示例代码展示了启动流程实例的方法,并提供了TaskListener的简单实现。此外,文章还提供了参考资料以供深入学习。
1844

被折叠的 条评论
为什么被折叠?



