您的位置:首页 > 编程语言 > Java开发

activiti 流程定义和流程实例的挂起

2017-02-25 11:32 501 查看


关于流程定义和流程实例的挂起,activiti的官方文档描述比较详细,摘录如下:


Suspending and activating a process

It’s possible to suspend a process definition. When a process definition is suspended,
new process instance can’t be created (an exception will be thrown).
Suspending the process definition is done through the 
RepositoryService
:

code segment

repositoryService.suspendProcessDefinitionByKey("vacationRequest");
try {
runtimeService.startProcessInstanceByKey("vacationRequest");
} catch (ActivitiException e) {
e.printStackTrace();
}


To reactivate a process definition, simply call one of the 
repositoryService.activateProcessDefinitionXXX
 methods.

It’s also possible to suspend a process instance. When suspended, the process cannot be continued (e.g. completing a task throws an exception) and no jobs (such as timers) will executed. Suspending a process instance can be done by calling the
runtimeService.suspendProcessInstance
 method.
Activating the process instance again is done by calling the
runtimeService.activateProcessInstanceXXX
 methods.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  activiti 流程挂起 java
相关文章推荐