本文整理汇总了Java中org.activiti.engine.ProcessEngine.getManagementService方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngine.getManagementService方法的具体用法?Java ProcessEngine.getManagementService怎么用?Java ProcessEngine.getManagementService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.ProcessEngine
的用法示例。
在下文中一共展示了ProcessEngine.getManagementService方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.activiti.engine.ProcessEngine; //导入方法依赖的package包/类
public static void main(String[] args) {
// 创建流程引擎
ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();
// 得到流程存储服务组件
RepositoryService repositoryService = engine.getRepositoryService();
// 得到运行时服务组件
RuntimeService runtimeService = engine.getRuntimeService();
// 得到任务服务组件
TaskService taskService = engine.getTaskService();
// 得到管理服务组件
ManagementService managementService = engine.getManagementService();
// 部署流程文件
repositoryService.createDeployment()
.addClasspathResource("bpmn/SignalThrowingEvent.bpmn").deploy();
// 启动流程
runtimeService.startProcessInstanceByKey("stProcess");
// 完成选择商品任务
Task firstTask = taskService.createTaskQuery().singleResult();
taskService.complete(firstTask.getId());
// 完成用户支付任务
Task payTask = taskService.createTaskQuery().singleResult();
taskService.complete(payTask.getId());
// 由于使用了异步的中间Throwing事件,因此会产生2条工作数据
List<Job> jobs = managementService.createJobQuery().list();
System.out.println(jobs.size());
}
示例2: ActivitiUtil
import org.activiti.engine.ProcessEngine; //导入方法依赖的package包/类
public ActivitiUtil(ProcessEngine engine, boolean deployWorkflowsInTenant)
{
this.repoService = engine.getRepositoryService();
this.runtimeService = engine.getRuntimeService();
this.taskService = engine.getTaskService();
this.historyService = engine.getHistoryService();
this.formService = engine.getFormService();
this.managementService = engine.getManagementService();
this.deployWorkflowsInTenant = deployWorkflowsInTenant;
}
示例3: activitiManagementService
import org.activiti.engine.ProcessEngine; //导入方法依赖的package包/类
@Bean
public ManagementService activitiManagementService(ProcessEngine activitiProcessEngine) throws Exception
{
return activitiProcessEngine.getManagementService();
}