1.基本概念
ProcessDefinition 流程定义,流程图以xml格式保存在.bpmn文件,由RepositoryService管理.
ProcessInstance/Execution 流程实例,每次申请按流程图走一遍,由RuntimeService管理.
Task 任务,一次审批动作,由TaskService管理.
2.整合spring
https://www.cnblogs.com/lyh421/p/6423154.html
3.需求描述
同意 当前task顺着箭头走.
拒绝 当前execution所有task结束,当前execution结束.
退回 当前execution所有task结束,当前execution激活开始节点.
4.公共类
StopCmd.java
package command;
import org.activiti.engine.impl.cmd.NeedsActiveExecutionCmd;
import org.activiti.engine.impl.interceptor.CommandContext;
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
public class StopCmd extends NeedsActiveExecutionCmd<Object> {
private static final long serialVersionUID = 1L;
public StopCmd(String executionId) {
super(executionId);
}
@Override
protected Object execute(CommandContext comm