资源简介
此文件为本人对activit测试的各种demo,符合工作流开发的各种场景,工作中的测试部分尽在这里,包括对在线编辑器的整合
代码片段和文件信息
package activitiTest;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.objectMapper;
import org.activiti.bpmn.converter.BpmnxmlConverter;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.editor.language.json.converter.BpmnJsonConverter;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.form.FormProperty;
import org.activiti.engine.form.StartFormData;
import org.activiti.engine.form.TaskFormData;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.activiti.engine.impl.identity.Authentication;
import org.activiti.engine.impl.util.json.JSONobject;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.Model;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Comment;
import org.activiti.engine.task.Task;
import org.junit.Test;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author wxt
* @date 2018/9/19
* @description:
*/
public class DocTest {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
@Test
public void model(){
List resultList = processEngine.getRepositoryService().createModelQuery().notDeployed().
orderByCreateTime().desc().list();
JSONobject resultJson = new JSONobject();
resultJson.put(“data“ resultList);
System.out.println( resultJson.toString());
}
//部署流程
/**
* 流程部署会在流程部署表中存在一封数据(act_re_deploment)
* 2501 zsyleave 2018-09-19 15:06:10.608
*
* 同时资源文件表中也会维护一份数据(act_ge_bytearray)
* 流程定义表会有数据(act_re_procdef)
* myleave:1:2504 1 http://www.activiti.org/processdef 请假 myleave 1 2501 zsyleave.bpmn20.xml zsyleave.myleave.png 中顺易员工请假审批流程图 0 1 1
*
* @throws IOException
*/
@Test
public void deployProcess() throws IOException {
RepositoryService repositoryService = processEngine.getRepositoryService();
String id = “37501“;
try {
Model modelData = repositoryService.getModel(id);
if (modelData != null) {
byte[] bytes = repositoryService.getModelEditorSource(modelData.getId());
if (bytes != null) {
JsonNode modelNode = new objectMapper().readTree(bytes);
BpmnModel model = new BpmnJsonConverter().convert
相关资源
- U9V2.8组件化实施方案-工作流
- A dynamic Rehosted Workflow Designer
- 前后端分离项目中引入activiti工作流引
- photomodeler scanner v6.2.2.596汉化破解原创
- 61850建模工具iedmodeler使用说明书
- eclipse activiti的插件
- SoftwareIdeasModeler10.30
- eclipse 4.x Luna安装activiti designer插件
- 使用IDEA对springboot+activiti开发demo和详
- Myeclipse 2017ci7 安装activiti 5.18.0插件亲
- aciviti主创人员开发的flowable官方文档
- mxgraph工作流设计
- Unlocking the Power of OPNET Modeler
- redmine中软件项目各角色工作流程制定
- actiBPM插件
- 群友分享的FLEX工作流设计器(含源码
- 一款可自定义工作流和表单、版式的
- 完整工作流系统源程序代码
- jbpm深入浅出第7章代码
- Activiti-Rest研究及接口文档
- Activiti在线流程设计器
- activiti-explorer2_5.22-官方汉化版_源码包
- 工作流管理技术基础---范玉顺
- Activiti用户手册中文版V5.21
- 工作流管理:模型、方法和系统(英
- IndustryPrintProcessModeler_20170718.zip
- opnet14.5_modeler_tutorial_pdfs
- 1.使用IDEA对springboot+activiti开发demo和详
- Activiti V5.21 用户手册 中文版(全)
- flowable_modeler集成设计器并内置用户
评论
共有 条评论