当前位置:网站首页>Activiti suspend and activate tasks
Activiti suspend and activate tasks
2022-04-22 17:43:00 【Manong up2u】
Activiti Code for suspending and activating tasks
public void suspendProcess(String businessKey)
{
ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery().processInstanceBusinessKey(businessKey);
if (processInstanceQuery != null) {
logger.debug(" Workflow status before suspension :" + (processInstanceQuery.singleResult().isSuspended() ? " Hang up " : " Activate "));
if (!processInstanceQuery.singleResult().isSuspended()) {
runtimeService.suspendProcessInstanceById(processInstanceQuery.singleResult().getId());
}
logger.debug(" Workflow status after suspension :" + (processInstanceQuery.singleResult().isSuspended() ? " Hang up " : " Activate "));
}
}
public void activateProcess(String businessKey)
{
ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery().processInstanceBusinessKey(businessKey);
if (processInstanceQuery != null) {
logger.debug(businessKey + " Workflow status before activation : " + (processInstanceQuery.singleResult().isSuspended() ? " Hang up " : " Activate "));
if (processInstanceQuery.singleResult().isSuspended()) {
runtimeService.activateProcessInstanceById(processInstanceQuery.singleResult().getId());
}
logger.debug(businessKey + " Workflow status after activation : " + (processInstanceQuery.singleResult().isSuspended() ? " Hang up " : " Activate "));
}
}

版权声明
本文为[Manong up2u]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221742000561.html
边栏推荐
- The idea settings services window displays tree services
- Daily practice - day 1 -3.18
- Inventory 6 open source projects of Niuniu
- PR如何调整输出视频的分辨率?
- 如何通过云效Codeup完成代码合并 | 云效
- 软考高项笔记 | 项目评估的依据
- 软考高项笔记 | 可行性研究的步骤
- 实现简易计算器
- De duplication of array objects and finding corresponding object data in array objects
- 锚定美元的USDD,如何引领数字货币变革
猜你喜欢

From a to Z, it is all the essence of Redis's learning notes.

S7-1500 specific methods and steps of data exchange between CPU and OPC UA server through OPC UA client
![[flywheel energy storage and power generation] simulation of flywheel and battery in microgrid based on Simulink](/img/63/9f3cbdb3060df4d01a36c43d3a8362.png)
[flywheel energy storage and power generation] simulation of flywheel and battery in microgrid based on Simulink

孙宇晨宣布上线USDD 推进金融自由

京东一面:子线程如何获取父线程 ThreadLocal 的值?我蒙了。。。

pr导出的avi文件,如何才能被imageJ读read?

Inventory 6 open source projects of Niuniu

软考高项笔记 | 可行性研究的内容

About wechat applet, solve the problem of blank area caused by keyboard bounce when there is tabbar

长安LUMIN首次高调亮相,三大产品力矩阵将迎来新变革
随机推荐
工业互联网创新迭代的推手
软考高项笔记 | 项目管理知识体系构成
锚定美元的USDD,如何引领数字货币变革
Daily practice - day 1 -3.18
Nonlinear optimization problem -- matlab
pr导出的avi文件,如何才能被imageJ读read?
Red team attack and defense knowledge sharing - Red Sun security team shooting range 1 - Express version
Pushing hand of industrial Internet innovation iteration
Prohibit copying content in web pages
Unable to translate SQLException with Error code ‘0‘, will now try the fallback translator
摆脱 AI 生产“小作坊”:如何基于 Kubernetes 构建云原生 AI 平台
U盘插入电脑识别不出来,怎么解决?
文章推荐 2022.4.18
Activiti 挂起与激活任务
The security configuration method of remote terminal service (3389) does not need public network IP, and realizes external network access to remote desktop in three steps
发起成立波场联合储备,孙宇晨向美联储发起“挑战”
视频播放常用的库
小程序如何集成即构IM实现即时通讯发消息聊天
Knowing that it is inevitable to break the listing in Hong Kong: Zhou Yuan was "beaten in the face", and the growth is extremely dependent on marketing
Go operation MySQL