资源简介
使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码
代码片段和文件信息
package org.autoee.web.common.controller;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.engine.HistoryService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.impl.RepositoryServiceImpl;
import org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas;
import org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.activiti.engine.impl.pvm.PvmTransition;
import org.activiti.engine.impl.pvm.process.ActivityImpl;
import org.apache.log4j.Logger;
import org.autoee.web.base.controller.baseController;
import org.autoee.web.common.exception.BusinessException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* @Description: [Activiti工作流公共方法Controller,提供工作流相关公共方法]
* @Author: [Double]
* @CreateDate: [2015-10-22]
* @Version: [v2.0.0]
*/
@Controller
@RequestMapping(“/activitiController“)
public class ActivitiController extends baseController {
static final Logger logger = Logger.getLogger(ActivitiController.class);
@Resource
private ProcessEngine processEngine;
@Resource
private RepositoryService repositoryService;
@Resource
private TaskService taskService;
@Resource
private RuntimeService runtimeService;
@Resource
private HistoryService historyService;
/**
* 打开流程图显示页面
**/
@RequestMapping(params = “openActivitiProccessImagePage“)
public ModelAndView openActivitiProccessImagePage(String pProcessInstanceId) throws Exception {
logger.info(“[开始]-打开流程图显示页面“);
ModelAndView modelAndView = new ModelAndView();
modelAndView.addobject(“processInstanceId“ pProcessInstanceId);
modelAndView.setViewName(“common/jsp/ActivitiProccessImagePage.jsp“);
logger.info(“[完成]-打开流程图显示页面“);
return modelAndView;
}
/**
* 获取流程图像,已执行节点和流程线高亮显示
*/
@RequestMapping(params = “getActivitiProccessImage“)
public void getActivitiProccessImage(String pProcessInstanceId HttpServletResponse response) throws Exception {
logger.info(“[开始]-获取流程图图像“);
// 设置页面不缓存
response.setHeader(“Pragma“ “No-cache“);
response.setHeader(“Cache-Control“ “no-cache“);
response.setDateHeader(“Expires“ 0);
try {
// 获取历史流程实例
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
.proces
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-11-02 10:41 使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码\
文件 5186 2015-10-29 11:57 使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码\ActivitiController.java
文件 537 2015-10-27 14:33 使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码\ActivitiProccessImagePage.jsp
文件 23789 2015-10-30 22:26 使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码\ProcessDiagramCanvas.java
文件 24732 2015-10-30 22:29 使用activiti工作流引擎显示流程图时高亮显示流程图中已执行节点和已执行路径方法源代码\ProcessDiagramGenerator.java
- 上一篇:Unity3D模型-喷火龙
- 下一篇:Verilog语言设计电梯控制器文档
评论
共有 条评论