天天看點

SpringBoot整合activiti5-業務表單

系列文章目錄(springboot整合activiti5)

在實際的開發當中,除了簡單的業務邏輯之外,還有更為複雜的業務,例如常見的主從表單,總之采用Activiti的内置表單和外置表單方式無法滿足所有的需求,這時,采用業務表單會更合适。業務表單模式非常靈活,最主要的特點就是訛誤資料的存放不再存放在Activiti相關的資料表中,而是單獨設計的業務資料表, 同時,将業務表單的主鍵存放在Activiti資料表中形成關聯。

比如以之前的費用報帳為例,進行業務表單的涉及。設計表如下所示

DROP TABLE IF EXISTS `Z_REIMBURSEMENT`;

CREATE TABLE `Z_REIMBURSEMENT` (
`ID`  VARCHAR(64) NOT NULL ,
`PID`  VARCHAR(64) NULL ,
`USERID`  VARCHAR(64) NULL ,
`FEE`  DECIMAL(10,2) NULL ,
`NOTE`  VARCHAR(255) NULL ,
`FEEDATE`  DATE NULL ,
`TYPE`  VARCHAR(255) NULL ,
`BMYJ`  VARCHAR(255) NULL ,
`REFEE`  DECIMAL(10,2)  NULL ,
`BZHU`  VARCHAR(255) NULL ,
`CREATEDATETIME`  DATETIME NULL ,

PRIMARY KEY (`ID`)
);
           

這個表有一個唯一主鍵ID辨別記錄的唯一性, 在實際業務中,必須将此字段和Activiti資料表ACT_RU_EXECUTION中的

BUSINESS_KEY_

字段關聯,這樣在進行一個任務的時候,可以通過任務Id最後查出業務表單中的資料,如下面邏輯所示

// 擷取任務Id查詢任務
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
// 根據任務中流程執行個體主鍵擷取任務對應的流程執行個體
String pId = task.getProcessInstanceId();
ProcessInstance pins = runtimeService.createProcessInstanceQuery()
		.processInstanceId(pId)
		.active().singleResult();
// 擷取流程執行個體的業務主鍵 查詢業務表單資訊
String bId = pins.getBusinessKey();
actId = pins.getActivityId();
reimbursement = reimbursementService.selectByPrimaryKey(bId);
           

比如

SpringBoot整合activiti5-業務表單
SpringBoot整合activiti5-業務表單

而業務表單Z_REIMBURSEMENT中的第二個字段PID則記錄的是流程執行個體的主鍵,這樣就能保證業務表和運作中的流程執行個體意義對應了, 字段USERID用于記錄流程開始人,其他字段的設計根據實際的業務來。由于表單資料都記錄到業務表當中,是以流程定義就比較簡單了。對應的檔案名稱為

reimbursement-2.bpmn

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.zioer.com/reimbursement-2">
  <process id="reimbursement-2" name="費用報帳-2" isExecutable="true">
    <startEvent id="startevent1" name="Start" activiti:initiator="startUserId"></startEvent>
    <userTask id="usertask1" name="部門上司審批" activiti:assignee="${startUserId}"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <userTask id="usertask2" name="财務部門審批" activiti:assignee="${startUserId}"></userTask>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
    <userTask id="usertask3" name="申請人确認" activiti:assignee="${startUserId}"></userTask>
    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="usertask3"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow4" sourceRef="usertask3" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_reimbursement-2">
    <bpmndi:BPMNPlane bpmnElement="reimbursement-2" id="BPMNPlane_reimbursement-2">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="180.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55.0" width="105.0" x="260.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
        <omgdc:Bounds height="55.0" width="105.0" x="410.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
        <omgdc:Bounds height="55.0" width="105.0" x="560.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="710.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="215.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="260.0" y="207.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="365.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="410.0" y="207.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="515.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="560.0" y="207.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="665.0" y="207.0"></omgdi:waypoint>
        <omgdi:waypoint x="710.0" y="207.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
           

為了測試友善,這裡的

ctiviti:assignee

都引用

activiti:initiator

,也就是發起人就能經辦是以的流程了。由于使用了業務表單,這裡每個節點再也沒有定義Form Key或Form的值了。因為業務表單不再需要這些,重點是需要關注的就是每個節點的id值,必須保證其在流程檔案中的唯一性。設計好了之後,将改檔案放到目錄

src/main/resources/processes/

當中,這樣在程式啟動的時候就能自動部署了,當然也可以采用手動部署的方式,這些在前面已經介紹過了。

由于要操作業務表單,是以必須在實體層、資料層和業務層添加類

實體層

package com.xquant.platform.test.activiti.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

public class Reimbursement implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String pid;
	private String userId;
	private double fee;
	private String note;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date feedate;
	private String type;
	private String bmyj;
	private double refee;
	private String bzhu;
	private Date createdatetime;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public double getFee() {
		return fee;
	}
	public void setFee(double fee) {
		this.fee = fee;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public Date getFeedate() {
		return feedate;
	}
	public void setFeedate(Date feedate) {
		this.feedate = feedate;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getBmyj() {
		return bmyj;
	}
	public void setBmyj(String bmyj) {
		this.bmyj = bmyj;
	}
	public double getRefee() {
		return refee;
	}
	public void setRefee(double refee) {
		this.refee = refee;
	}
	public String getBzhu() {
		return bzhu;
	}
	public void setBzhu(String bzhu) {
		this.bzhu = bzhu;
	}
	public Date getCreatedatetime() {
		return createdatetime;
	}
	public void setCreatedatetime(Date createdatetime) {
		this.createdatetime = createdatetime;
	}
}
           

資料層

package com.xquant.platform.test.activiti.dao;

import com.xquant.platform.test.activiti.entity.Reimbursement;

import java.util.List;


public interface ReimbursementMapper {
    public int insertReimbursement(Reimbursement record);

    public int deleteBykey(String id);

    public int updateReimbursement(Reimbursement record);

    public List<Reimbursement> listAll();

    public Reimbursement findByKey(String id);
}
           

對應的mapper定義

src/main/resources/sqlmapper/ReimbursementMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xquant.platform.test.activiti.dao.ReimbursementMapper">
	<resultMap id="ReimbursementResultMap" type="com.xquant.platform.test.activiti.entity.Reimbursement" >
	    <id column="id" property="id" />
		<result column="pid" property="pid" />
		<result column="userId" property="userId" />
		<result column="fee" property="fee" />
		<result column="note" property="note" />
		<result column="feedate" property="feedate" />
		<result column="type" property="type" />
		<result column="bmyj" property="bmyj" />
		<result column="refee" property="refee" />
		<result column="bzhu" property="bzhu" />
		<result column="createdatetime" property="createdatetime" />
	</resultMap>
	
	<sql id="selectReimbursementColumn">
		id,pid,userId,fee,note,
		feedate,type,bmyj,refee,
		bzhu,createdatetime 
	</sql>
	
	<select id="findByKey" parameterType="String" resultMap="ReimbursementResultMap">
		SELECT 
			<include refid="selectReimbursementColumn"></include>
		from
			Z_REIMBURSEMENT
		 where id = #{id}
	</select>
	
	<!-- 新增-->
	<insert id="insertReimbursement" parameterType="com.xquant.platform.test.activiti.entity.Reimbursement">
		<selectKey keyProperty="id" resultType="string" order="BEFORE">
		    SELECT REPLACE( UUID(),'-','') as a;
		</selectKey>
		INSERT INTO Z_REIMBURSEMENT 
			(id, pid, userId, fee, note, feedate, 
			type, bmyj, refee, bzhu, createdatetime) 
		VALUES 
			(
			#{id},#{pid},#{userId},#{fee},
			#{note},#{feedate},#{type},#{bmyj},
			#{refee},#{bzhu},#{createdatetime}
			)
	</insert>
	
	<!-- 删除-->
	<delete id="deleteBykey" parameterType="String">
		delete from Z_REIMBURSEMENT
		where 
			id = #{id}
	</delete>
	
	<!-- 編輯-->
	<update id="updateReimbursement" parameterType="com.xquant.platform.test.activiti.entity.Reimbursement">
		update Z_REIMBURSEMENT 
		<set>
			<if test="pid != null">
				pid = #{pid},
			</if>
			<if test="userId != null">
				userId = #{userId},
			</if>
			<if test="fee > 0">
				fee = #{fee},
			</if>
			<if test="note != null">
				note = #{note},
			</if>
			<if test="feedate != null">
				feedate = #{feedate},
			</if>
			<if test="type != null">
				type = #{type},
			</if>
			<if test="bmyj != null">
				bmyj = #{bmyj},
			</if>
			<if test="refee > 0">
				refee = #{refee},
			</if>
			<if test="bzhu != null">
				bzhu = #{bzhu},
			</if>
			<if test="id != null">
				id = #{id},
			</if>
			<if test="createdatetime != null">
				createdatetime = #{createdatetime},
			</if>
		</set>
		where id = #{id}		
	</update>
	
	<!-- 清單(全部) -->
	<select id="listAll" resultMap="ReimbursementResultMap" >
		SELECT 
			<include refid="selectReimbursementColumn"></include>
		from Z_REIMBURSEMENT
	</select>
	
</mapper>
           
此處我們業務表單的唯一主鍵是随機生成的UUID值去掉中間的-後的字元串

業務層接口

package com.xquant.platform.test.activiti.service;

import com.xquant.platform.test.activiti.entity.Reimbursement;

import java.util.List;

public interface ReimbursementService {
    int insert(Reimbursement record);

    int deleteByPrimaryKey(String id);

    int update(Reimbursement record);

    Reimbursement selectByPrimaryKey(String id);

    List<Reimbursement> listAll();
}
           

業務層實作類

package com.xquant.platform.test.activiti.service.Imp;

import com.xquant.platform.test.activiti.dao.ReimbursementMapper;
import com.xquant.platform.test.activiti.entity.Reimbursement;
import com.xquant.platform.test.activiti.service.ReimbursementService;
import org.activiti.engine.delegate.DelegateExecution;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;



@Service
public class ReimbursementServiceImpl implements ReimbursementService {
	
	@Resource(name = "sqlSessionTemplate")
	private SqlSessionTemplate sqlSessionTemplate;
	
	@Override
	public int insert(Reimbursement record) {
		ReimbursementMapper mapper = sqlSessionTemplate.getMapper(ReimbursementMapper.class);
		return mapper.insertReimbursement(record);
	}
	
	@Override
	public int deleteByPrimaryKey(String id) {
		ReimbursementMapper mapper = sqlSessionTemplate.getMapper(ReimbursementMapper.class);
		return mapper.deleteBykey(id);

	}

	@Override
	public Reimbursement selectByPrimaryKey(String id) {
		ReimbursementMapper mapper = sqlSessionTemplate.getMapper(ReimbursementMapper.class);
		return mapper.findByKey(id);
		
	}

	@Override
	public List<Reimbursement> listAll() {
		ReimbursementMapper mapper = sqlSessionTemplate.getMapper(ReimbursementMapper.class);
		
		List<Reimbursement> list = new ArrayList<Reimbursement>();
		list = mapper.listAll();
		 
		return list;
	}

	@Override
	public int update(Reimbursement record) {
		ReimbursementMapper mapper = sqlSessionTemplate.getMapper(ReimbursementMapper.class);
		return mapper.updateReimbursement(record);
	}
	
	@Transactional
	public Reimbursement saveReimbursement(DelegateExecution execution){
		String userId = execution.getVariable("startUserId").toString();
		Reimbursement reimbursement = new Reimbursement();		
		
    	reimbursement.setUserId(userId);
    	reimbursement.setCreatedatetime(new Date());
    	reimbursement.setPid(execution.getProcessInstanceId());
    	reimbursement.setFee(Integer.parseInt(execution.getVariable("fee").toString()));
    	reimbursement.setNote(execution.getVariable("note").toString());
    	reimbursement.setType(execution.getVariable("type").toString());
    	reimbursement.setFeedate((Date)execution.getVariable("feedate"));
    	
    	insert(reimbursement);
		return reimbursement;
	}
	
	@Transactional
	public void updateReimbursement(DelegateExecution execution){
		Reimbursement reimbursement = new Reimbursement();	
		
		reimbursement = (Reimbursement)execution.getVariable("var");
		
    	update(reimbursement);
		return ;
	}
}
           

另外我們修改了系統配置檔案

application.properties

中的相關配置,主要是關閉activiti的async任務,這樣日志才更好看一些,要不然這個activiti.async任務會幾秒鐘執行一次,然後列印日志。

logging.level.org.activiti.engine=trace
spring.activiti.async-executor-enabled=false
spring.activiti.async-executor-activate=false
           

做好以上的工作之後,就可以添加一個控制層BussformController用于操作業務表單了。

package com.xquant.platform.test.activiti.controller;

import com.xquant.platform.test.activiti.entity.Reimbursement;
import com.xquant.platform.test.activiti.service.ReimbursementService;
import org.activiti.engine.*;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.*;

/**
 * 業務表單模式
 */
@Controller
@RequestMapping(value = "/bussform")
public class BussformController {
    
    @Autowired
    private RepositoryService repositoryService;
    @Autowired
    private FormService formService;
    @Autowired
    private TaskService taskService;
    @Autowired
    private IdentityService identityService;
    @Autowired
    private HistoryService historyService;
    @Autowired
    private RuntimeService runtimeService;
    @Autowired
    private ReimbursementService reimbursementService;
    
    @RequestMapping(value = "/add")
    public String add(Model model,HttpSession session) {
    	if (session.getAttribute("userId") == null){
    		return "redirect:/login/";
    	}
		// 由于業務表單和流程邏輯無關,故其隻是簡單打開一個新增表單頁面
    	return "reimbursement-2_start";
    }
    
    /**
     * 送出啟動流程
     */
    @RequestMapping(value = "/start/save")
    public String saveStartForm(Model model, Reimbursement reimbursement, HttpSession session) {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}
    	Map<String, Object> variables = new HashMap<String, Object>();
    	// 首先儲存業務資料
    	reimbursement.setUserId(userId);
    	reimbursement.setCreatedatetime(new Date());
    	reimbursementService.insert(reimbursement);
    	// 擷取一個業務主鍵值
    	String businessKey = reimbursement.getId();
    	
    	try{
    		ProcessDefinition processDefinition = repositoryService
    				.createProcessDefinitionQuery()
    				.processDefinitionKey("reimbursement-2")
    				.latestVersion().singleResult();
    		// 擷取流程定義主鍵值
            String processDefinitionId = processDefinition.getId();
            
    		ProcessInstance processInstance = null;

    		identityService.setAuthenticatedUserId(userId);
    		// 建立一個流程執行個體對象
    		processInstance = runtimeService.startProcessInstanceById(processDefinitionId, businessKey, variables);
    		// 在業務表單當中記錄業務執行個體主鍵值
    		String pId = processInstance.getId();
            reimbursement.setPid(pId);
            reimbursementService.update(reimbursement);
         } finally {
             identityService.setAuthenticatedUserId(null);
         }

        return "redirect:/bussform/list";
    }

    @RequestMapping(value = "/list")
    public String list(Model model,HttpSession session) {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}
    	List<Task> tasks = new ArrayList<Task>();
    	
    	//獲得目前使用者對應reimbursement-2流程的任務
    	tasks = taskService.createTaskQuery()
    			.taskCandidateOrAssigned(userId).processDefinitionKey("reimbursement-2")
    			.active()
    			.orderByTaskId().desc().list();
    	
    	model.addAttribute("list", tasks);
    	
    	return "reimbursement-2_list";
    }
    
    /**
     * 初始化啟動流程
     */
    @RequestMapping(value = "/startform/{taskId}")
    public String StartTaskForm(@PathVariable("taskId") String taskId,Model model,HttpSession session) throws Exception {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}
    	Reimbursement reimbursement = null;
    	String actId = null;
    	try{
    		// 擷取任務Id查詢任務
    		Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
    		// 根據任務中流程執行個體主鍵擷取任務對應的流程執行個體
    		String pId = task.getProcessInstanceId();
    		ProcessInstance pins = runtimeService.createProcessInstanceQuery()
    				.processInstanceId(pId)
    				.active().singleResult();
    		// 擷取流程執行個體的業務主鍵 查詢業務表單資訊
    		String bId = pins.getBusinessKey();
    		actId = pins.getActivityId();
    		reimbursement = reimbursementService.selectByPrimaryKey(bId);
    	}catch(Exception e){
    		
    	}
    	
        model.addAttribute("data", reimbursement);
        model.addAttribute("taskId", taskId);
        model.addAttribute("actId", actId);

        return "reimbursement-2_edit";
    }
    /**
     * 送出啟動流程
     */
    @RequestMapping(value = "/startform/save/{taskId}")
    public String saveTaskForm(@PathVariable("taskId") String taskId,HttpSession session,Reimbursement reimbursement) {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}

        try {
        	// 設定認證使用者
            identityService.setAuthenticatedUserId(userId);
            Map<String, Object> map = new HashMap<String, Object>();
            // 完成任務
            taskService.complete(taskId, map);
            // 儲存業務表單資訊
            reimbursementService.update(reimbursement);
        } finally {
            identityService.setAuthenticatedUserId(null);
        }

        return "redirect:/bussform/list";
    }

    @RequestMapping(value = "/hlist")
    public String historylist(Model model,HttpSession session) {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}
    	    	
    	List<Map> hlist = new ArrayList<Map>();
    	List historylist = historyService.createHistoricProcessInstanceQuery()
    			.processDefinitionKey("reimbursement-2")
                .startedBy(userId).list();

    	for (int i=0;i<historylist.size();i++){
    		Map<String, Object> map = new HashMap<String, Object>();
    		HistoricProcessInstanceEntity hpe = (HistoricProcessInstanceEntity) historylist.get(i);
    		
    		map.put("id", hpe.getId());
    		map.put("startUserId", hpe.getStartUserId());
    		map.put("processInstanceId", hpe.getProcessInstanceId());
    		map.put("endTime", hpe.getEndTime());
    		map.put("startTime", hpe.getStartTime());
    		if (hpe.getEndTime() == null){
    			Task task =  taskService.createTaskQuery().processInstanceId(hpe.getProcessInstanceId()).active().singleResult();
    			if (task != null){
    				map.put("name", task.getName());
    			}
    		}else{
    			map.put("name", "已完成");
    		}
    		hlist.add(map);
    	}
    	
    	//獲得目前使用者的任務
    	model.addAttribute("list", hlist);
    	
    	return "reimbursement-2_hlist";
    }
    
    @RequestMapping(value = "/hview/{pId}")
    public String historyView(@PathVariable("pId") String pId,Model model,HttpSession session) {
    	String userId = session.getAttribute("userId") == null ? null : session.getAttribute("userId").toString();
    	if (userId == null){
    		return "redirect:/login/";
    	}
    	String bId = null;
    	HistoricProcessInstance hpi = historyService.createHistoricProcessInstanceQuery()
    			.processInstanceId(pId)
    			.singleResult();
    	
    	if (hpi != null){
    		bId = hpi.getBusinessKey();
    	}
    	
		Reimbursement reimbursement = reimbursementService.selectByPrimaryKey(bId);
		
    	model.addAttribute("data", reimbursement);
    	return "reimbursement2_hview";
    }
    
    public Map PageData(HttpServletRequest request){
		Map properties = request.getParameterMap();
		Map returnMap = new HashMap(); 
		Iterator entries = properties.entrySet().iterator(); 
		Map.Entry entry; 
		String name = "";  
		String value = "";  
		while (entries.hasNext()) {
			entry = (Map.Entry) entries.next(); 
			name = (String) entry.getKey(); 
			Object valueObj = entry.getValue(); 
			if(null == valueObj){ 
				value = ""; 
			}else if(valueObj instanceof String[]){ 
				String[] values = (String[])valueObj;
				for(int i=0;i<values.length;i++){ 
					 value = values[i] + ",";
				}
				value = value.substring(0, value.length()-1); 
			}else{
				value = valueObj.toString(); 
			}
			returnMap.put(name, value); 
		}
		return returnMap;
	}
}
           

登入完成之後,首先通路位址

http://localhost:8080/bussform/add

新增一個流程,此時的控制層邏輯其實很簡單,傳回一個

reimbursement-2_start.jsp

頁面即可、

SpringBoot整合activiti5-業務表單
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html lang="en">
<head>
    <title>費用報帳-新增</title>
    <link rel="stylesheet" rev="stylesheet" href="<%=basePath%>css/style.css" type="text/css" media="all" />
	<script type="text/javascript" src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>
	<script language=JavaScript>
		function save(){
		   document.getElementById("form").submit();
		}
	</script>
</head>
<body class="ContentBody">
<form action="start/save" method="post" name="form" id="form">
<div class="MainDiv">
<table width="90%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >費用報帳(業務表單)-新增</th>
  </tr>
  <tr>
    <td class="CPanel">
		<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
            <TR>
                <TD width="100%">
                    <fieldset style="height:100%;">
                    <legend>内容填寫</legend>
                         <table border="0" cellpadding="2" cellspacing="1" style="width:100%">
						    <tr>
						    <td nowrap align="right" width="13%">費用</td>
						    <td width="19%"><input type='text' id='fee' name='fee' value='' /></td>
						    <td width="13%" align="right" nowrap>費用類型</td>
						    <td width="55%"><select id="type" name="type">
						      <option value="差旅費">差旅費</option>
						      <option value="書報費">書報費</option>
						      <option value="會議費">會議費</option>
						      <option value="其他費">其他費</option>
						    </select></td>
						    </tr>
						    <tr>
						      <td nowrap align="right">發生日期</td>
						      <td colspan="3"><input type='text' id='feedate' name='feedate' value='' onClick="WdatePicker()"/></td>
						    </tr>
						    <tr>
						    <td nowrap align="right" width="13%">說明</td>
						    <td colspan="3"><textarea id='note' name='note' rows="5" cols="50"></textarea></td>
						    </tr>
					     </table>

                    </fieldset>			
                </TD>
            </TR>
		</TABLE>
	 </td>
  </tr>
  <tr>
    <TD colspan="2" align="center" height="50px">
        <input type="button" name="Submit" value="儲存" class="button" onclick="save();"/>    
        <input type="button" name="Submit2" value="傳回" class="button" onclick="window.history.go(-1);"/>
    </TD>
  </tr>
</table>
</div>
</form>
</body>
</html>
           
SpringBoot整合activiti5-業務表單

新增内容并送出

SpringBoot整合activiti5-業務表單

此過程就比較關鍵了。将業務表單資料與流程執行個體綁定。

SpringBoot整合activiti5-業務表單
SpringBoot整合activiti5-業務表單

控制台日志如下所示

2021-03-27 14:00:44.979 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:00:44.983 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting ProcessDefinitionQueryImpl --------------------------------------------------------
2021-03-27 14:00:45.028 DEBUG 9300 --- [nio-8080-exec-2] tProcessDefinitionsByQueryCriteria_mysql : ==>  Preparing: select distinct RES.* from ACT_RE_PROCDEF RES WHERE RES.KEY_ = ? and RES.VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = RES.KEY_ and ( (TENANT_ID_ IS NOT NULL and TENANT_ID_ = RES.TENANT_ID_) or (TENANT_ID_ IS NULL and RES.TENANT_ID_ IS NULL) ) ) order by RES.ID_ asc LIMIT ? OFFSET ? 
2021-03-27 14:00:45.030 DEBUG 9300 --- [nio-8080-exec-2] tProcessDefinitionsByQueryCriteria_mysql : ==> Parameters: reimbursement-2(String), 2147483647(Integer), 0(Integer)
2021-03-27 14:00:45.035 TRACE 9300 --- [nio-8080-exec-2] tProcessDefinitionsByQueryCriteria_mysql : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:00:45.036 TRACE 9300 --- [nio-8080-exec-2] tProcessDefinitionsByQueryCriteria_mysql : <==        Row: reimbursement-2:2:70011, 1, http://www.zioer.com/reimbursement-2, 費用報帳-2, reimbursement-2, 2, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png, null, 0, 1, 1, 
2021-03-27 14:00:45.042 DEBUG 9300 --- [nio-8080-exec-2] tProcessDefinitionsByQueryCriteria_mysql : <==      Total: 1
2021-03-27 14:00:45.043 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessDefinitionEntity[reimbursement-2:2:70011]' was not updated
2021-03-27 14:00:45.044 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 0 insert, 0 update, 0 delete.
2021-03-27 14:00:45.044 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:00:45.048 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- ProcessDefinitionQueryImpl finished --------------------------------------------------------
2021-03-27 14:00:45.049 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.282 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.284 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting StartProcessInstanceCmd --------------------------------------------------------
2021-03-27 14:03:13.356 DEBUG 9300 --- [nio-8080-exec-2] .a.e.i.p.e.P.selectProcessDefinitionById : ==>  Preparing: select * from ACT_RE_PROCDEF where ID_ = ? 
2021-03-27 14:03:13.359 DEBUG 9300 --- [nio-8080-exec-2] .a.e.i.p.e.P.selectProcessDefinitionById : ==> Parameters: reimbursement-2:2:70011(String)
2021-03-27 14:03:13.364 TRACE 9300 --- [nio-8080-exec-2] .a.e.i.p.e.P.selectProcessDefinitionById : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:03:13.365 TRACE 9300 --- [nio-8080-exec-2] .a.e.i.p.e.P.selectProcessDefinitionById : <==        Row: reimbursement-2:2:70011, 1, http://www.zioer.com/reimbursement-2, 費用報帳-2, reimbursement-2, 2, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png, null, 0, 1, 1, 
2021-03-27 14:03:13.370 DEBUG 9300 --- [nio-8080-exec-2] .a.e.i.p.e.P.selectProcessDefinitionById : <==      Total: 1
2021-03-27 14:03:13.371 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.D.selectDeploymentById       : ==>  Preparing: select * from ACT_RE_DEPLOYMENT where ID_ = ? 
2021-03-27 14:03:13.373 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.D.selectDeploymentById       : ==> Parameters: 70001(String)
2021-03-27 14:03:13.376 TRACE 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.D.selectDeploymentById       : <==    Columns: ID_, NAME_, CATEGORY_, TENANT_ID_, DEPLOY_TIME_
2021-03-27 14:03:13.378 TRACE 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.D.selectDeploymentById       : <==        Row: 70001, SpringAutoDeployment, null, , 2021-03-27 13:15:12.153
2021-03-27 14:03:13.381 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.D.selectDeploymentById       : <==      Total: 1
2021-03-27 14:03:13.383 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing deployment SpringAutoDeployment
2021-03-27 14:03:13.384 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : ==>  Preparing: select * from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = ? order by NAME_ asc 
2021-03-27 14:03:13.385 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : ==> Parameters: 70001(String)
2021-03-27 14:03:13.390 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==    Columns: ID_, REV_, NAME_, DEPLOYMENT_ID_, BYTES_, GENERATED_
2021-03-27 14:03:13.391 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70002, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic.bpmn20.xml, 70001, <<BLOB>>, 0
2021-03-27 14:03:13.393 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70003, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic2.bpmn, 70001, <<BLOB>>, 0
2021-03-27 14:03:13.395 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70005, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn, 70001, <<BLOB>>, 0
2021-03-27 14:03:13.396 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70007, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png, 70001, <<BLOB>>, 1
2021-03-27 14:03:13.398 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70004, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.bpmn, 70001, <<BLOB>>, 0
2021-03-27 14:03:13.399 TRACE 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==        Row: 70006, 1, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.reimbursement.png, 70001, <<BLOB>>, 1
2021-03-27 14:03:13.403 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.R.selectResourcesByDeploymentId : <==      Total: 6
2021-03-27 14:03:13.404  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic.bpmn20.xml
2021-03-27 14:03:13.603 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.handler.ProcessParseHandler  : Parsing process waiter
2021-03-27 14:03:13.605 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity service1
2021-03-27 14:03:13.617 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity start
2021-03-27 14:03:13.623 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity end
2021-03-27 14:03:13.626  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png
2021-03-27 14:03:13.627  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic2.bpmn
2021-03-27 14:03:13.635 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.handler.ProcessParseHandler  : Parsing process waiter2
2021-03-27 14:03:13.636 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity service1
2021-03-27 14:03:13.636 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity start
2021-03-27 14:03:13.637 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity end
2021-03-27 14:03:13.638  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.bpmn
2021-03-27 14:03:13.662 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.handler.ProcessParseHandler  : Parsing process reimbursement
2021-03-27 14:03:13.662 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity departmentApprove
2021-03-27 14:03:13.697 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity reimburseApprove
2021-03-27 14:03:13.699 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity usertask1
2021-03-27 14:03:13.707 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity startevent1
2021-03-27 14:03:13.708 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity endevent2
2021-03-27 14:03:13.710  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.reimbursement.png
2021-03-27 14:03:13.710  INFO 9300 --- [nio-8080-exec-2] o.a.e.impl.bpmn.deployer.BpmnDeployer    : Processing resource E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn
2021-03-27 14:03:13.726 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.handler.ProcessParseHandler  : Parsing process reimbursement-2
2021-03-27 14:03:13.727 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity usertask1
2021-03-27 14:03:13.728 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity usertask2
2021-03-27 14:03:13.729 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity usertask3
2021-03-27 14:03:13.730 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity startevent1
2021-03-27 14:03:13.730 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.p.h.AbstractBpmnParseHandler   : Parsing activity endevent1
2021-03-27 14:03:13.733 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==>  Preparing: select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) 
2021-03-27 14:03:13.734 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==> Parameters: 70001(String), waiter(String)
2021-03-27 14:03:13.739 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:03:13.741 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==        Row: waiter:6:70008, 1, processDefinitions, null, waiter, 6, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic.bpmn20.xml, null, null, 0, 0, 1, 
2021-03-27 14:03:13.746 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==      Total: 1
2021-03-27 14:03:13.748 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.749 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting GetProcessDefinitionInfoCmd --------------------------------------------------------
2021-03-27 14:03:13.750 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.i.CommandContextInterceptor      : Valid context found. Reusing it for the current command 'org.activiti.engine.impl.cmd.GetProcessDefinitionInfoCmd'
2021-03-27 14:03:13.751 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- GetProcessDefinitionInfoCmd finished --------------------------------------------------------
2021-03-27 14:03:13.751 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.753 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==>  Preparing: select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) 
2021-03-27 14:03:13.758 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==> Parameters: 70001(String), waiter2(String)
2021-03-27 14:03:13.762 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:03:13.763 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==        Row: waiter2:6:70009, 1, processDefinitions, null, waiter2, 6, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic2.bpmn, null, null, 0, 0, 1, 
2021-03-27 14:03:13.769 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==      Total: 1
2021-03-27 14:03:13.770 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.770 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting GetProcessDefinitionInfoCmd --------------------------------------------------------
2021-03-27 14:03:13.771 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.i.CommandContextInterceptor      : Valid context found. Reusing it for the current command 'org.activiti.engine.impl.cmd.GetProcessDefinitionInfoCmd'
2021-03-27 14:03:13.772 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- GetProcessDefinitionInfoCmd finished --------------------------------------------------------
2021-03-27 14:03:13.773 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.774 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==>  Preparing: select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) 
2021-03-27 14:03:13.776 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==> Parameters: 70001(String), reimbursement(String)
2021-03-27 14:03:13.780 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:03:13.781 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==        Row: reimbursement:8:70010, 1, http://www.zioer.com/reimbursement, 費用報帳, reimbursement, 8, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.bpmn, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.reimbursement.png, 公司費用報帳簡易流程, 0, 1, 1, 
2021-03-27 14:03:13.790 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==      Total: 1
2021-03-27 14:03:13.791 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.792 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting GetProcessDefinitionInfoCmd --------------------------------------------------------
2021-03-27 14:03:13.792 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.i.CommandContextInterceptor      : Valid context found. Reusing it for the current command 'org.activiti.engine.impl.cmd.GetProcessDefinitionInfoCmd'
2021-03-27 14:03:13.793 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- GetProcessDefinitionInfoCmd finished --------------------------------------------------------
2021-03-27 14:03:13.794 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.795 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==>  Preparing: select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? and KEY_ = ? and (TENANT_ID_ = '' or TENANT_ID_ is null) 
2021-03-27 14:03:13.796 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : ==> Parameters: 70001(String), reimbursement-2(String)
2021-03-27 14:03:13.801 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==    Columns: ID_, REV_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, DESCRIPTION_, HAS_START_FORM_KEY_, HAS_GRAPHICAL_NOTATION_, SUSPENSION_STATE_, TENANT_ID_
2021-03-27 14:03:13.802 TRACE 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==        Row: reimbursement-2:2:70011, 1, http://www.zioer.com/reimbursement-2, 費用報帳-2, reimbursement-2, 2, 70001, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn, E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png, null, 0, 1, 1, 
2021-03-27 14:03:13.807 DEBUG 9300 --- [nio-8080-exec-2] electProcessDefinitionByDeploymentAndKey : <==      Total: 1
2021-03-27 14:03:13.808 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.809 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting GetProcessDefinitionInfoCmd --------------------------------------------------------
2021-03-27 14:03:13.810 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.i.CommandContextInterceptor      : Valid context found. Reusing it for the current command 'org.activiti.engine.impl.cmd.GetProcessDefinitionInfoCmd'
2021-03-27 14:03:13.810 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- GetProcessDefinitionInfoCmd finished --------------------------------------------------------
2021-03-27 14:03:13.811 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.813 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:13.814 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- starting GetNextIdBlockCmd --------------------------------------------------------
2021-03-27 14:03:13.827 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.selectProperty             : ==>  Preparing: select * from ACT_GE_PROPERTY where NAME_ = ? 
2021-03-27 14:03:13.829 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.selectProperty             : ==> Parameters: next.dbid(String)
2021-03-27 14:03:13.834 TRACE 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.selectProperty             : <==    Columns: NAME_, VALUE_, REV_
2021-03-27 14:03:13.835 TRACE 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.selectProperty             : <==        Row: next.dbid, 72501, 30
2021-03-27 14:03:13.836 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.selectProperty             : <==      Total: 1
2021-03-27 14:03:13.839 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   update PropertyEntity[name=next.dbid, value=75001]
2021-03-27 14:03:13.840 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 0 insert, 1 update, 0 delete.
2021-03-27 14:03:13.841 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:03:13.841 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : updating: PropertyEntity[name=next.dbid, value=75001]
2021-03-27 14:03:13.845 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.updateProperty             : ==>  Preparing: update ACT_GE_PROPERTY SET REV_ = ?, VALUE_ = ? where NAME_ = ? and REV_ = ? 
2021-03-27 14:03:13.850 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.updateProperty             : ==> Parameters: 31(Integer), 75001(String), next.dbid(String), 30(Integer)
2021-03-27 14:03:13.858 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.P.updateProperty             : <==    Updates: 1
2021-03-27 14:03:16.139 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- GetNextIdBlockCmd finished --------------------------------------------------------
2021-03-27 14:03:16.139 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:03:16.140 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.entity.ExecutionEntity         : initializing ProcessInstance[72501]
2021-03-27 14:03:16.144 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.145 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: FULL
2021-03-27 14:03:16.149 DEBUG 9300 --- [nio-8080-exec-2] e.I.selectIdentityLinksByProcessInstance : ==>  Preparing: select * from ACT_RU_IDENTITYLINK where PROC_INST_ID_ = ? 
2021-03-27 14:03:16.150 DEBUG 9300 --- [nio-8080-exec-2] e.I.selectIdentityLinksByProcessInstance : ==> Parameters: 72501(String)
2021-03-27 14:03:16.162 DEBUG 9300 --- [nio-8080-exec-2] e.I.selectIdentityLinksByProcessInstance : <==      Total: 0
2021-03-27 14:03:16.169 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.173 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.202 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: o[email protected]47407b6d on [email protected]
2021-03-27 14:03:16.209 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.acti[email protected]7ca2606c on [email protected]
2021-03-27 14:03:16.210 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.[email protected]5c870ea0 on [email protected]
2021-03-27 14:03:16.211 DEBUG 9300 --- [nio-8080-exec-2] a.e.i.p.r.AtomicOperationActivityExecute : ProcessInstance[72501] executes Activity(startevent1): org.activiti.engine.impl.bpmn.behavior.NoneStartEventActivityBehavior
2021-03-27 14:03:16.218 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.J.selectJobsByExecutionId    : ==>  Preparing: select * from ACT_RU_JOB J where J.EXECUTION_ID_ = ? 
2021-03-27 14:03:16.219 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.J.selectJobsByExecutionId    : ==> Parameters: 72501(String)
2021-03-27 14:03:16.225 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.J.selectJobsByExecutionId    : <==      Total: 0
2021-03-27 14:03:16.226 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.b.behavior.BpmnActivityBehavior  : Leaving activity 'startevent1'
2021-03-27 14:03:16.229 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.eng[email protected]673caa1f on [email protected]
2021-03-27 14:03:16.230 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.231 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.eng[email protected]673caa1f on [email protected]
2021-03-27 14:03:16.232 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activit[email protected]30f8c7eb on [email protected]
2021-03-27 14:03:16.232 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engi[email protected]3a4ee6a3 on [email protected]
2021-03-27 14:03:16.233 DEBUG 9300 --- [nio-8080-exec-2] micOperationTransitionNotifyListenerTake : ProcessInstance[72501] takes transition (startevent1)--flow1-->(usertask1)
2021-03-27 14:03:16.237 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activi[email protected]26f1141f on [email protected]
2021-03-27 14:03:16.238 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engin[email protected]2e0c167b on [email protected]
2021-03-27 14:03:16.239 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.240 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engin[email protected]2e0c167b on [email protected]
2021-03-27 14:03:16.241 TRACE 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.[email protected]5c870ea0 on [email protected]
2021-03-27 14:03:16.241 DEBUG 9300 --- [nio-8080-exec-2] a.e.i.p.r.AtomicOperationActivityExecute : ProcessInstance[72501] executes Activity(usertask1): org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior
2021-03-27 14:03:16.244 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.T.selectTasksByExecutionId   : ==>  Preparing: select distinct T.* from ACT_RU_TASK T where T.EXECUTION_ID_ = ? 
2021-03-27 14:03:16.246 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.T.selectTasksByExecutionId   : ==> Parameters: 72501(String)
2021-03-27 14:03:16.251 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.T.selectTasksByExecutionId   : <==      Total: 0
2021-03-27 14:03:16.252 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.253 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.254 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.279 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.280 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:03:16.283 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.284 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:03:16.285 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'DeploymentEntity[id=70001, name=SpringAutoDeployment]' was not updated
2021-03-27 14:03:16.286 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessDefinitionEntity[reimbursement:8:70010]' was not updated
2021-03-27 14:03:16.287 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessDefinitionEntity[waiter:6:70008]' was not updated
2021-03-27 14:03:16.288 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessDefinitionEntity[reimbursement-2:2:70011]' was not updated
2021-03-27 14:03:16.288 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessDefinitionEntity[waiter2:6:70009]' was not updated
2021-03-27 14:03:16.289 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70006, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.reimbursement.png]' was not updated
2021-03-27 14:03:16.289 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70005, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.bpmn]' was not updated
2021-03-27 14:03:16.290 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70007, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement-2.reimbursement-2.png]' was not updated
2021-03-27 14:03:16.291 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70002, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic.bpmn20.xml]' was not updated
2021-03-27 14:03:16.291 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70004, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\reimbursement.bpmn]' was not updated
2021-03-27 14:03:16.292 TRACE 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ResourceEntity[id=70003, name=E:\20200702\xquant-platform-component-test-ext\target\classes\processes\basic2.bpmn]' was not updated
2021-03-27 14:03:16.292 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricProcessInstanceEntity[superProcessInstanceId=null]
2021-03-27 14:03:16.293 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricActivityInstanceEntity[activityId=startevent1, activityName=Start]
2021-03-27 14:03:16.294 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricActivityInstanceEntity[activityId=usertask1, activityName=部門上司審批]
2021-03-27 14:03:16.295 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert org.act[email protected]739649d2
2021-03-27 14:03:16.295 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricVariableInstanceEntity[id=72502, name=startUserId, revision=0, type=string, textValue=admin]
2021-03-27 14:03:16.296 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert Task[id=72506, name=部門上司審批]
2021-03-27 14:03:16.297 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert VariableInstanceEntity[id=72502, name=startUserId, type=string, textValue=admin]
2021-03-27 14:03:16.297 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert ProcessInstance[72501]
2021-03-27 14:03:16.298 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert IdentityLinkEntity[id=72503, type=starter, userId=admin, processInstanceId=72501]
2021-03-27 14:03:16.299 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricTaskInstanceEntity[id=72506, name=部門上司審批]
2021-03-27 14:03:16.299 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 10 insert, 0 update, 0 delete.
2021-03-27 14:03:16.300 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:03:16.301 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: HistoricVariableInstanceEntity[id=72502, name=startUserId, revision=0, type=string, textValue=admin]
2021-03-27 14:03:16.302 DEBUG 9300 --- [nio-8080-exec-2] e.i.p.e.H.insertHistoricVariableInstance : ==>  Preparing: insert into ACT_HI_VARINST (ID_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, NAME_, REV_, VAR_TYPE_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_, TEXT2_, CREATE_TIME_, LAST_UPDATED_TIME_) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.316 DEBUG 9300 --- [nio-8080-exec-2] e.i.p.e.H.insertHistoricVariableInstance : ==> Parameters: 72502(String), 72501(String), 72501(String), null, startUserId(String), 0(Integer), string(String), null, null, null, admin(String), null, 2021-03-27 14:03:16.145(Timestamp), 2021-03-27 14:03:16.145(Timestamp)
2021-03-27 14:03:16.319 DEBUG 9300 --- [nio-8080-exec-2] e.i.p.e.H.insertHistoricVariableInstance : <==    Updates: 1
2021-03-27 14:03:16.320 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: HistoricTaskInstanceEntity[id=72506, name=部門上司審批]
2021-03-27 14:03:16.322 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricTaskInstance : ==>  Preparing: insert into ACT_HI_TASKINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, OWNER_, ASSIGNEE_, START_TIME_, CLAIM_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TASK_DEF_KEY_, FORM_KEY_, PRIORITY_, DUE_DATE_, CATEGORY_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.351 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricTaskInstance : ==> Parameters: 72506(String), reimbursement-2:2:70011(String), 72501(String), 72501(String), 部門上司審批(String), null, null, null, admin(String), 2021-03-27 14:03:16.253(Timestamp), null, null, null, null, usertask1(String), null, 50(Integer), null, null, (String)
2021-03-27 14:03:16.354 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricTaskInstance : <==    Updates: 1
2021-03-27 14:03:16.355 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: HistoricProcessInstanceEntity[superProcessInstanceId=null]
2021-03-27 14:03:16.357 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.H.insertHistoricProcessInstance : ==>  Preparing: insert into ACT_HI_PROCINST ( ID_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_ID_, START_TIME_, END_TIME_, DURATION_, START_USER_ID_, START_ACT_ID_, END_ACT_ID_, SUPER_PROCESS_INSTANCE_ID_, DELETE_REASON_, TENANT_ID_, NAME_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.377 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.H.insertHistoricProcessInstance : ==> Parameters: 72501(String), 72501(String), b2e214608e6711eb857c0242ac110002(String), reimbursement-2:2:70011(String), 2021-03-27 14:03:16.174(Timestamp), null, null, admin(String), startevent1(String), null, null, null, (String), null
2021-03-27 14:03:16.380 DEBUG 9300 --- [nio-8080-exec-2] .e.i.p.e.H.insertHistoricProcessInstance : <==    Updates: 1
2021-03-27 14:03:16.450 DEBUG 9300 --- [nio-8080-exec-2] p.e.H.bulkInsertHistoricActivityInstance : ==>  Preparing: insert into ACT_HI_ACTINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_ID_, TASK_ID_, CALL_PROC_INST_ID_, ACT_NAME_, ACT_TYPE_, ASSIGNEE_, START_TIME_, END_TIME_, DURATION_, TENANT_ID_ ) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) , (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
2021-03-27 14:03:16.483 DEBUG 9300 --- [nio-8080-exec-2] p.e.H.bulkInsertHistoricActivityInstance : ==> Parameters: 72504(String), reimbursement-2:2:70011(String), 72501(String), 72501(String), startevent1(String), null, null, Start(String), startEvent(String), null, 2021-03-27 14:03:16.174(Timestamp), 2021-03-27 14:03:16.231(Timestamp), 57(Long), (String), 72505(String), reimbursement-2:2:70011(String), 72501(String), 72501(String), usertask1(String), 72506(String), null, 部門上司審批(String), userTask(String), admin(String), 2021-03-27 14:03:16.24(Timestamp), null, null, (String)
2021-03-27 14:03:16.488 DEBUG 9300 --- [nio-8080-exec-2] p.e.H.bulkInsertHistoricActivityInstance : <==    Updates: 2
2021-03-27 14:03:16.489 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: org.act[email protected]739649d2
2021-03-27 14:03:16.491 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricIdentityLink : ==>  Preparing: insert into ACT_HI_IDENTITYLINK (ID_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_) values (?, ?, ?, ?, ?, ?) 
2021-03-27 14:03:16.499 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricIdentityLink : ==> Parameters: 72503(String), starter(String), admin(String), null, null, 72501(String)
2021-03-27 14:03:16.502 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.H.insertHistoricIdentityLink : <==    Updates: 1
2021-03-27 14:03:16.504 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: ProcessInstance[72501]
2021-03-27 14:03:16.506 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.E.insertExecution            : ==>  Preparing: insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_ID_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_,IS_EVENT_SCOPE_, PARENT_ID_, SUPER_EXEC_, SUSPENSION_STATE_, CACHED_ENT_STATE_, TENANT_ID_, NAME_) values ( ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.527 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.E.insertExecution            : ==> Parameters: 72501(String), 72501(String), b2e214608e6711eb857c0242ac110002(String), reimbursement-2:2:70011(String), usertask1(String), true(Boolean), false(Boolean), true(Boolean), false(Boolean), null, null, 1(Integer), 2(Integer), (String), null
2021-03-27 14:03:16.530 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.E.insertExecution            : <==    Updates: 1
2021-03-27 14:03:16.531 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: Task[id=72506, name=部門上司審批]
2021-03-27 14:03:16.534 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.entity.TaskEntity.insertTask   : ==>  Preparing: insert into ACT_RU_TASK (ID_, REV_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.558 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.entity.TaskEntity.insertTask   : ==> Parameters: 72506(String), 部門上司審批(String), null, null, 50(Integer), 2021-03-27 14:03:16.242(Timestamp), null, admin(String), null, 72501(String), 72501(String), reimbursement-2:2:70011(String), usertask1(String), null, null, 1(Integer), (String), null
2021-03-27 14:03:16.561 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.entity.TaskEntity.insertTask   : <==    Updates: 1
2021-03-27 14:03:16.563 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: IdentityLinkEntity[id=72503, type=starter, userId=admin, processInstanceId=72501]
2021-03-27 14:03:16.565 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.I.insertIdentityLink         : ==>  Preparing: insert into ACT_RU_IDENTITYLINK (ID_, REV_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_, PROC_INST_ID_, PROC_DEF_ID_) values (?, 1, ?, ?, ?, ?, ?, ?) 
2021-03-27 14:03:16.575 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.I.insertIdentityLink         : ==> Parameters: 72503(String), starter(String), admin(String), null, null, 72501(String), null
2021-03-27 14:03:16.578 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.I.insertIdentityLink         : <==    Updates: 1
2021-03-27 14:03:16.579 DEBUG 9300 --- [nio-8080-exec-2] o.activiti.engine.impl.db.DbSqlSession   : inserting: VariableInstanceEntity[id=72502, name=startUserId, type=string, textValue=admin]
2021-03-27 14:03:16.580 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.V.insertVariableInstance     : ==>  Preparing: insert into ACT_RU_VARIABLE (ID_, REV_, TYPE_, NAME_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_, TEXT2_) values ( ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:03:16.595 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.V.insertVariableInstance     : ==> Parameters: 72502(String), string(String), startUserId(String), 72501(String), 72501(String), null, null, null, null, admin(String), null
2021-03-27 14:03:16.598 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.i.p.e.V.insertVariableInstance     : <==    Updates: 1
2021-03-27 14:03:16.639 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : --- StartProcessInstanceCmd finished --------------------------------------------------------
2021-03-27 14:03:16.640 DEBUG 9300 --- [nio-8080-exec-2] o.a.e.impl.interceptor.LogInterceptor    : 


           

首先查詢流程定義

SpringBoot整合activiti5-業務表單

接下來開始建立流程執行個體 過程比較繁瑣

SpringBoot整合activiti5-業務表單

最後的結果如下

SpringBoot整合activiti5-業務表單

在業務表單中對應的資料

SpringBoot整合activiti5-業務表單

通過以上的操作就開啟了一個流程執行個體了。接下來相關的經辦人就可以查詢到流程中對應的任務。在控制層通過重定向實作的。

SpringBoot整合activiti5-業務表單
2021-03-27 14:18:50.977 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:18:50.978 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.impl.interceptor.LogInterceptor    : --- starting TaskQueryImpl --------------------------------------------------------
2021-03-27 14:18:51.065 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.G.selectGroupsByUserId       : ==>  Preparing: select g.* from ACT_ID_GROUP g, ACT_ID_MEMBERSHIP membership where g.ID_ = membership.GROUP_ID_ and membership.USER_ID_ = ? 
2021-03-27 14:18:51.067 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.G.selectGroupsByUserId       : ==> Parameters: admin(String)
2021-03-27 14:18:51.074 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.G.selectGroupsByUserId       : <==      Total: 0
2021-03-27 14:18:51.092 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==>  Preparing: select distinct RES.* from ACT_RU_TASK RES left join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = RES.ID_ inner join ACT_RE_PROCDEF D on RES.PROC_DEF_ID_ = D.ID_ WHERE D.KEY_ = ? and RES.SUSPENSION_STATE_ = 1 and (RES.ASSIGNEE_ = ? or (RES.ASSIGNEE_ is null and I.TYPE_ = 'candidate' and (I.USER_ID_ = ? ))) order by RES.ID_ desc LIMIT ? OFFSET ? 
2021-03-27 14:18:51.095 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==> Parameters: reimbursement-2(String), admin(String), admin(String), 2147483647(Integer), 0(Integer)
2021-03-27 14:18:51.102 TRACE 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2021-03-27 14:18:51.107 TRACE 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==        Row: 72506, 1, 72501, 72501, reimbursement-2:2:70011, 部門上司審批, null, null, usertask1, null, admin, null, 50, 2021-03-27 14:03:16.242, null, null, 1, , null
2021-03-27 14:18:51.115 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==      Total: 1
2021-03-27 14:18:51.117 TRACE 9300 --- [nio-8080-exec-4] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'Task[id=72506, name=部門上司審批]' was not updated
2021-03-27 14:18:51.117 DEBUG 9300 --- [nio-8080-exec-4] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 0 insert, 0 update, 0 delete.
2021-03-27 14:18:51.119 DEBUG 9300 --- [nio-8080-exec-4] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:18:51.123 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.impl.interceptor.LogInterceptor    : --- TaskQueryImpl finished --------------------------------------------------------
2021-03-27 14:18:51.124 DEBUG 9300 --- [nio-8080-exec-4] o.a.e.impl.interceptor.LogInterceptor    : 
           

通過

reimbursement-2_list.jsp

頁面渲染

<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf8" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<title>Zioer-Activiti示例</title>
<link rel="stylesheet" rev="stylesheet" href="<%=basePath%>css/style.css" type="text/css" media="all" />
<script language=JavaScript>

</script>
</head>

<body class="ContentBody">
<form action="add" method="post" name="fom" id="fom">
<div class="MainDiv">
<table width="90%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >費用報帳管理(業務表單)-待辦工作</th>
  </tr>
  <tr>
    <td class="CPanel">
		<table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          	 
              <tr>
                <td height="40" class="font42">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFEE" class="newfont03">
				 <tr class="CTitle" >
                    	<td height="22" colspan="5" align="center" style="font-size:16px">目前使用者辦理工作清單</td>
                  </tr>
                  <tr bgcolor="#EEEEEE">
				    <td width="10%" height="30">任務ID</td>
					<td width="20%">目前節點</td>
                    <td width="20%">辦理人</td>
                    <td width="36%">建立時間</td>
					<td width="17%">操作</td>
                  </tr>
                  <c:forEach items="${list}" var="var" varStatus="vs">
                  <tr  <c:if test="${vs.count%2==0}">bgcolor="#AAAABB"</c:if> align="left" >
				    <td >${var.id}</td>
				    <td  height="30">${var.name}</td>
					<td >${var.assignee}</td>                    
					<td ><fmt:formatDate value="${var.createTime}" type="both"/></td>                    
					<td ><a href="<%=basePath%>bussform/startform/${var.id}">辦理</a></td>
                  </tr>
                  </c:forEach>
            </table></td>
        </tr>
      </table>
      </td>
  </tr>
</table>
	 </td>
  </tr>
  
</table>
</div>
</form>
</body>
</html>
           
SpringBoot整合activiti5-業務表單

點選辦理,此時會将任務Id傳遞到背景,根據這個任務ID就可以查詢到相應的任務,在任務當中又包含了業務表單的主鍵,就可以查詢到表單相關的資料了。

SpringBoot整合activiti5-業務表單
2021-03-27 14:26:48.694 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:26:48.695 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : --- starting TaskQueryImpl --------------------------------------------------------
2021-03-27 14:26:48.776 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==>  Preparing: select distinct RES.* from ACT_RU_TASK RES WHERE RES.ID_ = ? order by RES.ID_ asc LIMIT ? OFFSET ? 
2021-03-27 14:26:48.782 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==> Parameters: 72506(String), 2147483647(Integer), 0(Integer)
2021-03-27 14:26:48.788 TRACE 9300 --- [nio-8080-exec-3] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2021-03-27 14:26:48.791 TRACE 9300 --- [nio-8080-exec-3] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==        Row: 72506, 1, 72501, 72501, reimbursement-2:2:70011, 部門上司審批, null, null, usertask1, null, admin, null, 50, 2021-03-27 14:03:16.242, null, null, 1, , null
2021-03-27 14:26:48.797 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==      Total: 1
2021-03-27 14:26:48.799 TRACE 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'Task[id=72506, name=部門上司審批]' was not updated
2021-03-27 14:26:48.799 DEBUG 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 0 insert, 0 update, 0 delete.
2021-03-27 14:26:48.800 DEBUG 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:26:48.806 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : --- TaskQueryImpl finished --------------------------------------------------------
2021-03-27 14:26:48.807 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:27:19.041 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:27:19.050 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : --- starting ProcessInstanceQueryImpl --------------------------------------------------------
2021-03-27 14:27:19.115 DEBUG 9300 --- [nio-8080-exec-3] e.E.selectProcessInstanceByQueryCriteria : ==>  Preparing: select distinct RES.* , P.KEY_ as ProcessDefinitionKey, P.ID_ as ProcessDefinitionId, P.NAME_ as ProcessDefinitionName, P.VERSION_ as ProcessDefinitionVersion, P.DEPLOYMENT_ID_ as DeploymentId from ACT_RU_EXECUTION RES inner join ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_ WHERE RES.PARENT_ID_ is null and RES.ID_ = ? and RES.PROC_INST_ID_ = ? and (RES.SUSPENSION_STATE_ = 1) order by RES.ID_ asc LIMIT ? OFFSET ? 
2021-03-27 14:27:19.119 DEBUG 9300 --- [nio-8080-exec-3] e.E.selectProcessInstanceByQueryCriteria : ==> Parameters: 72501(String), 72501(String), 2147483647(Integer), 0(Integer)
2021-03-27 14:27:19.129 TRACE 9300 --- [nio-8080-exec-3] e.E.selectProcessInstanceByQueryCriteria : <==    Columns: ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PARENT_ID_, PROC_DEF_ID_, SUPER_EXEC_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_, IS_EVENT_SCOPE_, SUSPENSION_STATE_, CACHED_ENT_STATE_, TENANT_ID_, NAME_, LOCK_TIME_, ProcessDefinitionKey, ProcessDefinitionId, ProcessDefinitionName, ProcessDefinitionVersion, DeploymentId
2021-03-27 14:27:19.131 TRACE 9300 --- [nio-8080-exec-3] e.E.selectProcessInstanceByQueryCriteria : <==        Row: 72501, 1, 72501, b2e214608e6711eb857c0242ac110002, null, reimbursement-2:2:70011, null, usertask1, 1, 0, 1, 0, 1, 2, , null, null, reimbursement-2, reimbursement-2:2:70011, 費用報帳-2, 2, 70001
2021-03-27 14:27:19.166 DEBUG 9300 --- [nio-8080-exec-3] e.E.selectProcessInstanceByQueryCriteria : <==      Total: 1
2021-03-27 14:27:19.170 TRACE 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'ProcessInstance[72501]' was not updated
2021-03-27 14:27:19.171 DEBUG 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 0 insert, 0 update, 0 delete.
2021-03-27 14:27:19.173 DEBUG 9300 --- [nio-8080-exec-3] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:27:19.181 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : --- ProcessInstanceQueryImpl finished --------------------------------------------------------
2021-03-27 14:27:19.182 DEBUG 9300 --- [nio-8080-exec-3] o.a.e.impl.interceptor.LogInterceptor    : 


           
SpringBoot整合activiti5-業務表單

接下來通過

reimbursement-2_edit.jsp

渲染

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html lang="en">
<head>
    <title>費用報帳-審批</title>
    <link rel="stylesheet" rev="stylesheet" href="<%=basePath%>css/style.css" type="text/css" media="all" />
	<script type="text/javascript" src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>
	<script language=JavaScript>
		function save(){
		   document.getElementById("form").submit();
		}
	</script>
</head>
<body>
<form action="save/${taskId}" method="post" name="form" id="form">
<div class="MainDiv">
<table width="60%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >費用報帳(業務表單)-審批</th>
  </tr>
  <tr>
    <td class="CPanel">
		<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
            <TR>
                <TD width="100%">
                    <fieldset style="height:100%;">
                    <legend>内容填寫</legend>
                        <c:choose>
		                  	<c:when test="${actId=='usertask1'}">
		                  		<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
								    <tr>
								    <td nowrap align="right" width="13%">申請人</td>
								    <td  colspan="3">${data.userId}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">費用</td>
								    <td width="19%">${data.fee}</td>
								    <td width="13%" align="right" nowrap>費用類型</td>
								    <td width="55%">${data.type}</td>
								    </tr>
								    <tr>
								      <td nowrap align="right">發生日期</td>
								      <td colspan="3"><fmt:formatDate type="date" value="${data.feedate}" /></td>
								    </tr>
								    <tr>
								    <td nowrap align="right" width="13%">說明</td>
								    <td colspan="3">${data.note}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">部門上司意見</td>
								    <td colspan="3">
								    <textarea id='bmyj' name='bmyj' rows="5" cols="50"></textarea>
								    <input type="hidden" name="id" id="id" value="${data.id}" />
								    </td>
								    </tr>
								</table>   
		                  	</c:when>
		                  	<c:when test="${actId=='usertask2'}">
		                  		<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
								    <tr>
								    <td nowrap align="right" width="13%">申請人</td>
								    <td  colspan="3">${data.userId}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">費用</td>
								    <td width="19%">${data.fee}</td>
								    <td width="13%" align="right" nowrap>核實費用</td>
								    <td width="55%"><input type='text' id='refee' name='refee' value='' /></td>
								    </tr>
								    <tr>
								      <td nowrap align="right">發生日期</td>
								      <td><fmt:formatDate type="date" value="${data.feedate}" /></td>
									  <td width="13%" align="right" nowrap>費用類型</td>
								      <td width="55%">${data.type}</td>
								    </tr>
								    <tr>
								    <td nowrap align="right" width="13%">說明</td>
								    <td colspan="3">${data.note}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">部門上司意見</td>
								    <td colspan="3">${data.bmyj}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">财務部門意見</td>
								    <td colspan="3">
								    <textarea id='bzhu' name='bzhu' rows="5" cols="50"></textarea>
								    <input type="hidden" name="id" id="id" value="${data.id}" />
								    </td>
								    </tr>
								</table>
		                  	</c:when>
		                  	<c:otherwise>
		                  		<table border="0" cellpadding="2" cellspacing="1" style="width:100%">
								    <tr>
								    <td nowrap align="right" width="13%">費用</td>
								    <td width="19%">${data.fee}</td>
								    <td width="13%" align="right" nowrap>核實費用</td>
								    <td width="55%">${data.refee}</td>
								    </tr>
								    <tr>
								      <td nowrap align="right">發生日期</td>
								      <td><fmt:formatDate type="date" value="${data.feedate}" /></td>
									  <td width="13%" align="right" nowrap>費用類型</td>
								      <td width="55%">${data.type}</td>
								    </tr>
								    <tr>
								    <td nowrap align="right" width="13%">說明</td>
								    <td colspan="3">${data.note}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">部門上司意見</td>
								    <td colspan="3">${data.bmyj}</td>
								    </tr>
									<tr>
								    <td nowrap align="right" width="13%">财務部門意見</td>
								    <td colspan="3">
								    ${data.bzhu}
								    <input type="hidden" name="id" id="id" value="${data.id}" />
								    </td>
								    </tr>
								</table>
		                  	</c:otherwise>
			          </c:choose>	
                    </fieldset>
                </TD>
            </TR>
		</TABLE>
	 </td>
  </tr>
  <tr>
    <TD colspan="2" align="center" height="50px">
        <input type="button" name="Submit" value="儲存" class="button" onclick="save();"/>     
        <input type="button" name="Submit2" value="傳回" class="button" onclick="window.history.go(-1);"/>
    </TD>
  </tr>
</table>
</div>
</form>
</body>
</html>
           

注意在這裡還傳遞了一個actId,這樣就可以在一個jsp包含多個流程的資訊了。在上面的jsp中就包含了usertask1、usertask2、usertask3的表單。

SpringBoot整合activiti5-業務表單

最後渲染的結果如下所示

SpringBoot整合activiti5-業務表單

填寫意見并儲存,此時就會進入到完成目前任務的階段了,差別于其他表單,這裡需要更新業務表單的資料了。其實整個過程無非就是把業務表單資料傳來傳去而已。

SpringBoot整合activiti5-業務表單
2021-03-27 14:35:53.274 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.LogInterceptor    : 

2021-03-27 14:35:53.275 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.LogInterceptor    : --- starting CompleteTaskCmd --------------------------------------------------------
2021-03-27 14:35:53.346 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.selectTask   : ==>  Preparing: select * from ACT_RU_TASK where ID_ = ? 
2021-03-27 14:35:53.349 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.selectTask   : ==> Parameters: 72506(String)
2021-03-27 14:35:53.358 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.selectTask   : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2021-03-27 14:35:53.361 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.selectTask   : <==        Row: 72506, 1, 72501, 72501, reimbursement-2:2:70011, 部門上司審批, null, null, usertask1, null, admin, null, 50, 2021-03-27 14:03:16.242, null, null, 1, , null
2021-03-27 14:35:53.371 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.selectTask   : <==      Total: 1
2021-03-27 14:35:53.374 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.selectExecution            : ==>  Preparing: select * from ACT_RU_EXECUTION where ID_ = ? 
2021-03-27 14:35:53.376 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.selectExecution            : ==> Parameters: 72501(String)
2021-03-27 14:35:53.389 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.selectExecution            : <==    Columns: ID_, REV_, PROC_INST_ID_, BUSINESS_KEY_, PARENT_ID_, PROC_DEF_ID_, SUPER_EXEC_, ACT_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_, IS_EVENT_SCOPE_, SUSPENSION_STATE_, CACHED_ENT_STATE_, TENANT_ID_, NAME_, LOCK_TIME_
2021-03-27 14:35:53.391 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.selectExecution            : <==        Row: 72501, 1, 72501, b2e214608e6711eb857c0242ac110002, null, reimbursement-2:2:70011, null, usertask1, 1, 0, 1, 0, 1, 2, , null, null
2021-03-27 14:35:53.401 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.selectExecution            : <==      Total: 1
2021-03-27 14:35:53.403 DEBUG 9300 --- [nio-8080-exec-9] e.I.selectIdentityLinksByProcessInstance : ==>  Preparing: select * from ACT_RU_IDENTITYLINK where PROC_INST_ID_ = ? 
2021-03-27 14:35:53.405 DEBUG 9300 --- [nio-8080-exec-9] e.I.selectIdentityLinksByProcessInstance : ==> Parameters: 72501(String)
2021-03-27 14:35:53.410 TRACE 9300 --- [nio-8080-exec-9] e.I.selectIdentityLinksByProcessInstance : <==    Columns: ID_, REV_, GROUP_ID_, TYPE_, USER_ID_, TASK_ID_, PROC_INST_ID_, PROC_DEF_ID_
2021-03-27 14:35:53.411 TRACE 9300 --- [nio-8080-exec-9] e.I.selectIdentityLinksByProcessInstance : <==        Row: 72503, 1, null, starter, admin, null, 72501, null
2021-03-27 14:35:53.414 DEBUG 9300 --- [nio-8080-exec-9] e.I.selectIdentityLinksByProcessInstance : <==      Total: 1
2021-03-27 14:35:53.416 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByParentTaskId  : ==>  Preparing: select * from ACT_RU_TASK where PARENT_TASK_ID_ = ? 
2021-03-27 14:35:53.418 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByParentTaskId  : ==> Parameters: 72506(String)
2021-03-27 14:35:53.424 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByParentTaskId  : <==      Total: 0
2021-03-27 14:35:53.425 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.I.selectIdentityLinksByTask  : ==>  Preparing: select * from ACT_RU_IDENTITYLINK where TASK_ID_ = ? 
2021-03-27 14:35:53.427 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.I.selectIdentityLinksByTask  : ==> Parameters: 72506(String)
2021-03-27 14:35:53.431 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.I.selectIdentityLinksByTask  : <==      Total: 0
2021-03-27 14:35:53.434 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.V.selectVariablesByTaskId    : ==>  Preparing: select * from ACT_RU_VARIABLE where TASK_ID_ = ? 
2021-03-27 14:35:53.436 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.V.selectVariablesByTaskId    : ==> Parameters: 72506(String)
2021-03-27 14:35:53.440 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.V.selectVariablesByTaskId    : <==      Total: 0
2021-03-27 14:35:53.442 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.444 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.selectHistoricTaskInstance : ==>  Preparing: select * from ACT_HI_TASKINST where ID_ = ? 
2021-03-27 14:35:53.445 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.selectHistoricTaskInstance : ==> Parameters: 72506(String)
2021-03-27 14:35:53.452 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.selectHistoricTaskInstance : <==    Columns: ID_, PROC_DEF_ID_, TASK_DEF_KEY_, PROC_INST_ID_, EXECUTION_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, OWNER_, ASSIGNEE_, START_TIME_, CLAIM_TIME_, END_TIME_, DURATION_, DELETE_REASON_, PRIORITY_, DUE_DATE_, FORM_KEY_, CATEGORY_, TENANT_ID_
2021-03-27 14:35:53.455 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.selectHistoricTaskInstance : <==        Row: 72506, reimbursement-2:2:70011, usertask1, 72501, 72501, 部門上司審批, null, null, null, admin, 2021-03-27 14:03:16.253, null, null, null, null, 50, null, null, null, 
2021-03-27 14:35:53.468 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.selectHistoricTaskInstance : <==      Total: 1
2021-03-27 14:35:53.475 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByExecutionId   : ==>  Preparing: select distinct T.* from ACT_RU_TASK T where T.EXECUTION_ID_ = ? 
2021-03-27 14:35:53.477 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByExecutionId   : ==> Parameters: 72501(String)
2021-03-27 14:35:53.486 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByExecutionId   : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2021-03-27 14:35:53.490 TRACE 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByExecutionId   : <==        Row: 72506, 1, 72501, 72501, reimbursement-2:2:70011, 部門上司審批, null, null, usertask1, null, admin, null, 50, 2021-03-27 14:03:16.242, null, null, 1, , null
2021-03-27 14:35:53.499 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.T.selectTasksByExecutionId   : <==      Total: 1
2021-03-27 14:35:53.501 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.b.behavior.BpmnActivityBehavior  : Leaving activity 'usertask1'
2021-03-27 14:35:53.502 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.eng[email protected]673caa1f on [email protected]
2021-03-27 14:35:53.503 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:35:53.531 DEBUG 9300 --- [nio-8080-exec-9] HistoricActivityInstancesByQueryCriteria : ==>  Preparing: select RES.* from ACT_HI_ACTINST RES WHERE RES.EXECUTION_ID_ = ? and RES.ACT_ID_ = ? and RES.END_TIME_ is null order by RES.ID_ asc LIMIT ? OFFSET ? 
2021-03-27 14:35:53.534 DEBUG 9300 --- [nio-8080-exec-9] HistoricActivityInstancesByQueryCriteria : ==> Parameters: 72501(String), usertask1(String), 1(Integer), 0(Integer)
2021-03-27 14:35:53.538 TRACE 9300 --- [nio-8080-exec-9] HistoricActivityInstancesByQueryCriteria : <==    Columns: ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_ID_, TASK_ID_, CALL_PROC_INST_ID_, ACT_NAME_, ACT_TYPE_, ASSIGNEE_, START_TIME_, END_TIME_, DURATION_, TENANT_ID_
2021-03-27 14:35:53.540 TRACE 9300 --- [nio-8080-exec-9] HistoricActivityInstancesByQueryCriteria : <==        Row: 72505, reimbursement-2:2:70011, 72501, 72501, usertask1, 72506, null, 部門上司審批, userTask, admin, 2021-03-27 14:03:16.240, null, null, 
2021-03-27 14:35:53.547 DEBUG 9300 --- [nio-8080-exec-9] HistoricActivityInstancesByQueryCriteria : <==      Total: 1
2021-03-27 14:35:53.548 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.eng[email protected]673caa1f on [email protected]
2021-03-27 14:35:53.550 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activit[email protected]30f8c7eb on [email protected]
2021-03-27 14:35:53.551 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engi[email protected]3a4ee6a3 on [email protected]
2021-03-27 14:35:53.552 DEBUG 9300 --- [nio-8080-exec-9] micOperationTransitionNotifyListenerTake : ProcessInstance[72501] takes transition (usertask1)--flow2-->(usertask2)
2021-03-27 14:35:53.554 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activi[email protected]26f1141f on [email protected]
2021-03-27 14:35:53.555 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engin[email protected]2e0c167b on [email protected]
2021-03-27 14:35:53.556 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:35:53.558 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.activiti.engin[email protected]2e0c167b on [email protected]
2021-03-27 14:35:53.559 TRACE 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.CommandContext    : AtomicOperation: org.[email protected]5c870ea0 on [email protected]
2021-03-27 14:35:53.560 DEBUG 9300 --- [nio-8080-exec-9] a.e.i.p.r.AtomicOperationActivityExecute : ProcessInstance[72501] executes Activity(usertask2): org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior
2021-03-27 14:35:53.562 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.563 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.565 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.566 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.567 DEBUG 9300 --- [nio-8080-exec-9] a.e.i.p.e.V.selectVariablesByExecutionId : ==>  Preparing: select * from ACT_RU_VARIABLE where EXECUTION_ID_ = ? and TASK_ID_ is null 
2021-03-27 14:35:53.569 DEBUG 9300 --- [nio-8080-exec-9] a.e.i.p.e.V.selectVariablesByExecutionId : ==> Parameters: 72501(String)
2021-03-27 14:35:53.574 TRACE 9300 --- [nio-8080-exec-9] a.e.i.p.e.V.selectVariablesByExecutionId : <==    Columns: ID_, REV_, TYPE_, NAME_, EXECUTION_ID_, PROC_INST_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_, TEXT_, TEXT2_
2021-03-27 14:35:53.575 TRACE 9300 --- [nio-8080-exec-9] a.e.i.p.e.V.selectVariablesByExecutionId : <==        Row: 72502, 1, string, startUserId, 72501, 72501, null, null, null, null, admin, null
2021-03-27 14:35:53.582 DEBUG 9300 --- [nio-8080-exec-9] a.e.i.p.e.V.selectVariablesByExecutionId : <==      Total: 1
2021-03-27 14:35:53.584 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: AUDIT
2021-03-27 14:35:53.585 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:35:53.586 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.history.DefaultHistoryManager    : Current history level: AUDIT, level required: ACTIVITY
2021-03-27 14:35:53.587 TRACE 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'VariableInstanceEntity[id=72502, name=startUserId, type=string, textValue=admin]' was not updated
2021-03-27 14:35:53.588 TRACE 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : loaded object 'IdentityLinkEntity[id=72503, type=starter, userId=admin, processInstanceId=72501]' was not updated
2021-03-27 14:35:53.589 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricActivityInstanceEntity[activityId=usertask2, activityName=财務部門審批]
2021-03-27 14:35:53.589 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   insert Task[id=72508, name=财務部門審批]
2021-03-27 14:35:53.590 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   insert HistoricTaskInstanceEntity[id=72508, name=财務部門審批]
2021-03-27 14:35:53.591 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   update HistoricActivityInstanceEntity[activityId=usertask1, activityName=部門上司審批]
2021-03-27 14:35:53.591 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   update ProcessInstance[72501]
2021-03-27 14:35:53.592 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   update HistoricTaskInstanceEntity[id=72506, name=部門上司審批]
2021-03-27 14:35:53.593 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   :   delete Task[id=72506, name=部門上司審批]
2021-03-27 14:35:53.594 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : flush summary: 3 insert, 3 update, 1 delete.
2021-03-27 14:35:53.595 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : now executing flush...
2021-03-27 14:35:53.595 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : inserting: HistoricTaskInstanceEntity[id=72508, name=财務部門審批]
2021-03-27 14:35:53.597 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.insertHistoricTaskInstance : ==>  Preparing: insert into ACT_HI_TASKINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, OWNER_, ASSIGNEE_, START_TIME_, CLAIM_TIME_, END_TIME_, DURATION_, DELETE_REASON_, TASK_DEF_KEY_, FORM_KEY_, PRIORITY_, DUE_DATE_, CATEGORY_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:35:53.626 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.insertHistoricTaskInstance : ==> Parameters: 72508(String), reimbursement-2:2:70011(String), 72501(String), 72501(String), 财務部門審批(String), null, null, null, admin(String), 2021-03-27 14:35:53.563(Timestamp), null, null, null, null, usertask2(String), null, 50(Integer), null, null, (String)
2021-03-27 14:35:53.630 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.insertHistoricTaskInstance : <==    Updates: 1
2021-03-27 14:35:53.631 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : inserting: HistoricActivityInstanceEntity[activityId=usertask2, activityName=财務部門審批]
2021-03-27 14:35:53.633 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.insertHistoricActivityInstance : ==>  Preparing: insert into ACT_HI_ACTINST ( ID_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_ID_, TASK_ID_, CALL_PROC_INST_ID_, ACT_NAME_, ACT_TYPE_, ASSIGNEE_, START_TIME_, END_TIME_, DURATION_, TENANT_ID_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:35:53.656 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.insertHistoricActivityInstance : ==> Parameters: 72507(String), reimbursement-2:2:70011(String), 72501(String), 72501(String), usertask2(String), 72508(String), null, 财務部門審批(String), userTask(String), admin(String), 2021-03-27 14:35:53.557(Timestamp), null, null, (String)
2021-03-27 14:35:53.659 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.insertHistoricActivityInstance : <==    Updates: 1
2021-03-27 14:35:53.660 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : inserting: Task[id=72508, name=财務部門審批]
2021-03-27 14:35:53.665 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.insertTask   : ==>  Preparing: insert into ACT_RU_TASK (ID_, REV_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_) values (?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
2021-03-27 14:35:53.693 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.insertTask   : ==> Parameters: 72508(String), 财務部門審批(String), null, null, 50(Integer), 2021-03-27 14:35:53.562(Timestamp), null, admin(String), null, 72501(String), 72501(String), reimbursement-2:2:70011(String), usertask2(String), null, null, 1(Integer), (String), null
2021-03-27 14:35:53.702 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.insertTask   : <==    Updates: 1
2021-03-27 14:35:53.703 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : updating: HistoricActivityInstanceEntity[activityId=usertask1, activityName=部門上司審批]
2021-03-27 14:35:53.706 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.updateHistoricActivityInstance : ==>  Preparing: update ACT_HI_ACTINST set EXECUTION_ID_ = ?, ASSIGNEE_ = ?, END_TIME_ = ?, DURATION_ = ? where ID_ = ? 
2021-03-27 14:35:53.710 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.updateHistoricActivityInstance : ==> Parameters: 72501(String), admin(String), 2021-03-27 14:35:53.548(Timestamp), 1957308(Long), 72505(String)
2021-03-27 14:35:53.717 DEBUG 9300 --- [nio-8080-exec-9] e.i.p.e.H.updateHistoricActivityInstance : <==    Updates: 1
2021-03-27 14:35:53.718 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : updating: ProcessInstance[72501]
2021-03-27 14:35:53.721 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.updateExecution            : ==>  Preparing: update ACT_RU_EXECUTION set REV_ = ?, BUSINESS_KEY_ = ?, PROC_DEF_ID_ = ?, ACT_ID_ = ?, IS_ACTIVE_ = ?, IS_CONCURRENT_ = ?, IS_SCOPE_ = ?, IS_EVENT_SCOPE_ = ?, PARENT_ID_ = ?, SUPER_EXEC_ = ?, SUSPENSION_STATE_ = ?, CACHED_ENT_STATE_ = ?, NAME_ = ? where ID_ = ? and REV_ = ? 
2021-03-27 14:35:53.731 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.updateExecution            : ==> Parameters: 2(Integer), b2e214608e6711eb857c0242ac110002(String), reimbursement-2:2:70011(String), usertask2(String), true(Boolean), false(Boolean), true(Boolean), false(Boolean), null, null, 1(Integer), 2(Integer), null, 72501(String), 1(Integer)
2021-03-27 14:35:53.739 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.E.updateExecution            : <==    Updates: 1
2021-03-27 14:35:53.741 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : updating: HistoricTaskInstanceEntity[id=72506, name=部門上司審批]
2021-03-27 14:35:53.745 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.updateHistoricTaskInstance : ==>  Preparing: update ACT_HI_TASKINST set PROC_DEF_ID_ = ?, EXECUTION_ID_ = ?, NAME_ = ?, PARENT_TASK_ID_ = ?, DESCRIPTION_ = ?, OWNER_ = ?, ASSIGNEE_ = ?, CLAIM_TIME_ = ?, END_TIME_ = ?, DURATION_ = ?, DELETE_REASON_ = ?, TASK_DEF_KEY_ = ?, FORM_KEY_ = ?, PRIORITY_ = ?, DUE_DATE_ = ?, CATEGORY_ = ? where ID_ = ? 
2021-03-27 14:35:53.754 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.updateHistoricTaskInstance : ==> Parameters: reimbursement-2:2:70011(String), 72501(String), 部門上司審批(String), null, null, null, admin(String), null, 2021-03-27 14:35:53.469(Timestamp), 1957216(Long), completed(String), usertask1(String), null, 50(Integer), null, null, 72506(String)
2021-03-27 14:35:53.759 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.e.H.updateHistoricTaskInstance : <==    Updates: 1
2021-03-27 14:35:53.761 DEBUG 9300 --- [nio-8080-exec-9] o.activiti.engine.impl.db.DbSqlSession   : executing: delete Task[id=72506, name=部門上司審批]
2021-03-27 14:35:53.763 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.deleteTask   : ==>  Preparing: delete from ACT_RU_TASK where ID_ = ? and REV_ = ? 
2021-03-27 14:35:53.769 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.deleteTask   : ==> Parameters: 72506(String), 1(Integer)
2021-03-27 14:35:53.774 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.i.p.entity.TaskEntity.deleteTask   : <==    Updates: 1
2021-03-27 14:35:53.803 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.LogInterceptor    : --- CompleteTaskCmd finished --------------------------------------------------------
2021-03-27 14:35:53.804 DEBUG 9300 --- [nio-8080-exec-9] o.a.e.impl.interceptor.LogInterceptor    : 
           
SpringBoot整合activiti5-業務表單

業務表單中的資料

SpringBoot整合activiti5-業務表單

接下來的流程就是辦理、送出了,基本一緻。