activiti官网实例项目activiti-explorer之获取流程节点

如上图在保存步骤中添加获取节点信息方法nodes();
方法如下:
//获取所有节点
JsonNode modelNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(model.getId()));
BpmnModel model1 = new BpmnJsonConverter().convertToBpmnModel(modelNode);
if(model1 != null) {
Process process = model1.getProcesses().get(0);//process对象封装了全部的节点、连线、以及关口等信息
Collection<FlowElement> flowElements = process.getFlowElements();//获得所有节点
for(FlowElement flowElement : flowElements) {
if(flowElement instanceof SequenceFlow){return;}//此处判断如果是“连线节点”,则跳过处理。
System.out.println("flowelement id:" + flowElement.getId() + " name:" + flowElement.getName() + " class:" + flowElement.getClass().toString());
if(flowElement instanceof EndEvent){//此处判断是否为结束节点,对应还有StartEvent开始节点
String idd = "";
List<SequenceFlow> alowList = ((org.activiti.bpmn.model.FlowNode) flowElement).getIncomingFlows();//获取入线信息-->获取所有上级节点
List<SequenceFlow> sequenceFlowList = ((org.activiti.bpmn.model.FlowNode) flowElement).getOutgoingFlows();//获取出线信息-->获取所有下级节点
for (SequenceFlow sequenceFlow : alowList) {//循环并可以获得所有上级节点id(父节点id),用于存储本地数据库
sequenceFlow.getSourceRef();//对应父节点和子节点的id
//其余属性可根据自己的需求来进行查看获取
}
activiti官网实例项目activiti-explorer之获取流程节点的更多相关文章
- activiti官网实例项目activiti-explorer之扩展流程节点属性2
情景需求:需要查找activiti-explorer项目中获取流程id的方法,然后根据流程id获取相应字段在节点属性中添加内容. 大致流程:拿取整个流程id获取对应表单属性,在页面节点属性中展示对应表 ...
- activiti官网实例项目activiti-explorer实操详情
参考链接:https://www.xuchuruo.cn/Activiti-modeler%E6%95%B4%E5%90%88%E5%88%B0Spring.html 按照链接文章提示操作完成之后,启 ...
- activiti官网实例项目activiti-explorer之扩展流程节点属性
节点中添加“关联表单”属性 1,stencilset.json中加入如下代码 , { "name" : "approveTypepackage", ...
- activiti官网实例项目activiti-explorer之扩展多选框回显功能
相关参考链接:https://blog.csdn.net/murongxuesheng/article/details/76147380 回显:确认选中属性ng-model,循环属性ng-repeat ...
- Knockout官网实例在MVC下的实现-02,实现计次
本篇使用Knockout在MVC下实现"Hello World",对应的官网实例在这里. 当次数达到3: View视图 页面包含三个部分:1.显示点击按钮的次数2.button按钮 ...
- Knockout官网实例在MVC下的实现-01,实现Hello world
本篇使用Knockout在MVC下实现"Hello World",对应的官网实例在这里. View视图 Knockout的一个特点是:声明式绑定,即Declarative bind ...
- 官网实例详解-目录和实例简介-keras学习笔记四
官网实例详解-目录和实例简介-keras学习笔记四 2018-06-11 10:36:18 wyx100 阅读数 4193更多 分类专栏: 人工智能 python 深度学习 keras 版权声明: ...
- [ActionScript 3.0] Away3D 官网实例
/* Dynamic tree generation and placement in a night-time scene Demonstrates: How to create a height ...
- Android自动化学习笔记之Robotium:学习官网实例
---------------------------------------------------------------------------------------------------- ...
随机推荐
- 常用oracle中系统表查询语句
sqlplus / as sysdbaSQL>select status from v$instance;1.查看最大连接数show parameter processes;2.查询oracle ...
- api签名认证方案
微信签名算法 token (自己后台配置) nonce:随机数 signature:签名 echostr:返回字符串 https://mp.weixin.qq.com/wiki?t=resource/ ...
- python io-os
#IO - os import os; #文件改名 #os.rename('io.txt','newio.txt'); #删除文件 #os.remove('io2.txt'); #创建文件夹(目录) ...
- C#遍历枚举中所有值
public enum EnumColor { 红色=1, 黑色=2, 白色=3 } foreach (EnumColor item in Enum.GetValues(typeof(EnumColo ...
- sequelize 中文文档
https://demopark.github.io/sequelize-docs-Zh-CN/
- 读取excel 文件到datatable
上一篇文章介绍了将datatable 内容导出到excel 文件,这里介绍如何将一个excel 文件读取出来,并保持到datatable 中,实际这样的应用场景也是经常遇到的. 这里继续使用了Micr ...
- 窗口置顶 - 仿TopWind
前置学习:低级鼠标hook,获得鼠标状态. 这个在原来获得鼠标状态的基础上,加上一个事件处理即可. TopWind就是一个可以置顶窗口的文件,避免复制粘贴的时候的来回切换(大窗口与小窗口),算是一个实 ...
- MFC 编辑框输入16进制字符串转换为16进制数或者10进制数据计算
1.编辑框添加变量,并选择变量类型为CString. 2. 使用“_tcstoul”函数将Cstring 类型转换为16进制/10进制数进行计算.
- Python【每日一问】10
问:请解释一下迭代器 答:可以被 __next__() 函数调用并不断返回下一个值的对象称为迭代器:Iterator
- Python【每日一问】07
问:请解释使用 *args 和 **kwargs 的含义 答: *args:可变参数,表示将实参中按照位置传值,多余的值都给 args,多余的实参被打包成 tuple(元组),然后传递给函数调用 # ...