当前位置:网站首页>Activiti practice
Activiti practice
2022-06-23 22:09:00 【Is paidaxing there】
1. actual combat
// Rendering dynamic forms
@GetMapping(path = "/formDataShow")
public AjaxResponse formDataShow(String taskId) { try { if(GlobalConfig.Test){ securityUtil.logInAs("bajie");}
Task task = taskRuntime.task(taskId);
UserTask userTask = (UserTask)repositoryService.getBpmnModel(task.getProcessDefinitionId())
.getFlowElement(task.getFormKey());
List<FormProperty> formPropertiesList = userTask.getFormProperties();
for(FormProperty formProperty:formPropertiesList){}
return AjaxResponse.ajaxData(GlobalConfig.ResponseCode.SUCCESS.getCode(),
GlobalConfig.ResponseCode.SUCCESS.getDesc(),null);
}catch (Exception e){return AjaxResponse.ajaxData(GlobalConfig.ResponseCode.ERROR.getCode()," Failed to render dynamic form !",null);
}
}
Task task = taskRuntime.task(taskId);
UserTask userTask = (UserTask)repositoryService.getBpmnModel(task.getProcessDefinitionId())
.getFlowElement(task.getFormKey());
List<FormProperty> formPropertiesList = userTask.getFormProperties();
for(FormProperty formProperty:formPropertiesList){}
Among them, we get the task through acquisition , And then through the form key(task.getFormKey()) To get to the userTask, In theory, we should transfer the task key That is to say :
Only with this value can we get the properties of the form , But we can't get this key, So only when drawing the flow chart , We put the form key Task related key Set to consistent , In this way, we pass in the key That is, with the task key Consistent to get userTask 了 .
Let's draw the flow chart :
The executors of the two tasks are designated as bajie, Then we put the form key All assigned to task key Agreement .
Then we just add a few forms as shown in the figure , Write values casually , Then the process is downloaded and released .
Then call the interface we wrote above , View the attribute values of the form :
It seems that we haven't got any data , Just get a form type and key.
But we can use another way to get the data :
边栏推荐
- [open source]goravel, a fully functional and extensible golang web application framework
- Devops sharing: how to hold the meeting?
- TDD开发模式推荐流程
- ICML2022 | 基于对比学习的离线元强化学习的鲁棒任务表示
- BenchCLAMP:评估语义分析语言模型的基准
- Start optimization - directed acyclic graph
- Experiment 5 module, package and Library
- Tencent cloud server ubuntu18 installs MySQL and logs in remotely
- Use of dotenv in nestjs
- Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
猜你喜欢

实验五 模块、包和库

Cloud native practice of meituan cluster scheduling system

Leetcode must review six lintcode (28348455116385)

Introduction to scikit learn machine learning practice

万字长文!一文搞懂InheritedWidget 局部刷新机制

《阿里云天池大赛赛题解析》——O2O优惠卷预测

Acl2022 | MVR: multi view document representation for open domain retrieval

Peking University, University of California Berkeley and others jointly | domain adaptive text classification with structured knowledge from unlabeled data (Domain Adaptive Text Classification Based o

微信小程序中发送网络请求

Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
随机推荐
CMU博士论文 | 通过记忆的元强化学习,118页pdf
What is stock online account opening? Is it safe to open a mobile account?
Find my information | Apple may launch the second generation airtag. Try the Lenz technology find my solution
How to do API gateway routing? What are the other functions of API gateway?
Data visualization: summer without watermelon is not summer
Meaning of the last seven digits of wider face
What is the reason for the error when calling API prompt 401 after easycvr replaces the version?
智能座舱SoC竞争升级,国产7nm芯片迎来重要突破
Surprise! Edge computing will replace cloud computing??
北大、加州伯克利大學等聯合| Domain-Adaptive Text Classification with Structured Knowledge from Unlabeled Data(基於未標記數據的結構化知識的領域自適應文本分類)
How to correctly divide data into databases and tables
DM sub database and sub table DDL "pessimistic coordination" mode introduction - tidb tool sharing
The latest research progress of domain generalization from CVPR 2022
API gateway verification token the role of adding a new authentication token in API gateway
v-chart
CAD图在线Web测量工具代码实现(测量距离、面积、角度等)
The most common usage scenarios for redis
Outlook開機自啟+關閉時最小化
Modify jar package
Go bubbling, cocktail, quick, insert sort