当前位置: 首页>>代码示例>>Java>>正文


Java ManagementService类代码示例

本文整理汇总了Java中org.activiti.engine.ManagementService的典型用法代码示例。如果您正苦于以下问题:Java ManagementService类的具体用法?Java ManagementService怎么用?Java ManagementService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ManagementService类属于org.activiti.engine包,在下文中一共展示了ManagementService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEngineServices

import org.activiti.engine.ManagementService; //导入依赖的package包/类
@Override
public EngineServices getEngineServices() {
    if (this.engineServicesMock != null) {
        return this.engineServicesMock;
    }

    this.engineServicesMock = mock(EngineServices.class);
    when(engineServicesMock.getFormService()).thenReturn(mock(FormService.class));
    when(engineServicesMock.getHistoryService()).thenReturn(mock(HistoryService.class));
    when(engineServicesMock.getIdentityService()).thenReturn(mock(IdentityService.class));
    when(engineServicesMock.getManagementService()).thenReturn(mock(ManagementService.class));
    when(engineServicesMock.getRepositoryService()).thenReturn(mock(RepositoryService.class));
    when(engineServicesMock.getRuntimeService()).thenReturn(mock(RuntimeService.class));
    when(engineServicesMock.getTaskService()).thenReturn(mock(TaskService.class));

    return engineServicesMock;
}
 
开发者ID:SAP,项目名称:cf-mta-deploy-service,代码行数:18,代码来源:MockDelegateExecution.java

示例2: main

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx =
            new AnnotationConfigApplicationContext();
    ctx.register(SpringAnnotationConfiguration.class);
    ctx.refresh();

    assertNotNull(ctx.getBean(ProcessEngine.class));
    assertNotNull(ctx.getBean(RuntimeService.class));
    TaskService bean = ctx.getBean(TaskService.class);
    assertNotNull(bean);
    assertNotNull(ctx.getBean(HistoryService.class));
    assertNotNull(ctx.getBean(RepositoryService.class));
    assertNotNull(ctx.getBean(ManagementService.class));
    assertNotNull(ctx.getBean(FormService.class));
    Task task = bean.newTask();
    task.setName("哈哈");
    bean.saveTask(task);
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:19,代码来源:InitProcessEngineBySpringAnnotation.java

示例3: main

import org.activiti.engine.ManagementService; //导入依赖的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());
}
 
开发者ID:yudar1024,项目名称:spring4-springmvc4-mybatis3-activiti,代码行数:27,代码来源:SignalThrowingEvent.java

示例4: getManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public ManagementService getManagementService() {
    if (processEngine == null) {
        return null;
    }

    return processEngine.getManagementService();
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:8,代码来源:ProxyProcessEngine.java

示例5: findJobs

import org.activiti.engine.ManagementService; //导入依赖的package包/类
/**
 * 作业.
 */
public Page findJobs(String tenantId, Page page) {
    ManagementService managementService = processEngine
            .getManagementService();

    long count = managementService.createJobQuery().jobTenantId(tenantId)
            .count();
    List<Job> jobs = managementService.createJobQuery()
            .jobTenantId(tenantId)
            .listPage((int) page.getStart(), page.getPageSize());
    page.setResult(jobs);
    page.setTotalCount(count);

    return page;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:18,代码来源:ProcessConnectorImpl.java

示例6: execute

import org.activiti.engine.ManagementService; //导入依赖的package包/类
@Override
public void execute(DelegateExecution execution) throws Exception {
    ManagementService managementService = execution.getEngineServices().getManagementService();
    Job job = managementService.createJobQuery().processInstanceId(execution.getProcessInstanceId()).singleResult();
    if (job.getRetries() > 0) {
        throw new RuntimeException("本次作业执行失败,再次执行可以成功!");
    }
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:9,代码来源:JobExecuteFailExecutor.java

示例7: getManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public ManagementService getManagementService() {
  return managementService;
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:4,代码来源:ProcessEngineImpl.java

示例8: configure

import org.activiti.engine.ManagementService; //导入依赖的package包/类
@Override
protected void configure() {
	bind(ProcessEngine.class).toProvider(ProcessEngineProvider.class).in(Singleton.class);
	bind(FormService.class).toProvider(FormServiceProvider.class).in(Singleton.class);
	bind(HistoryService.class).toProvider(HistoryServiceProvider.class).in(Singleton.class);
	bind(IdentityService.class).toProvider(IdentityServiceProvider.class).in(Singleton.class);
	bind(ManagementService.class).toProvider(ManagementServiceProvider.class).in(Singleton.class);
	bind(RepositoryService.class).toProvider(RepositoryServiceProvider.class).in(Singleton.class);
	bind(RuntimeService.class).toProvider(RuntimeServiceProvider.class).in(Singleton.class);
	bind(TaskService.class).toProvider(TaskServiceProvider.class).in(Singleton.class);
}
 
开发者ID:mortezaadi,项目名称:ninja-activiti-module,代码行数:12,代码来源:ActivitiModule.java

示例9: getManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
/**
 * @return ManagementService
 */
public ManagementService getManagementService()
{
    return managementService;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:ActivitiUtil.java

示例10: CustomTaskQuery

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public CustomTaskQuery(ManagementService managementService) {
    super(managementService);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:4,代码来源:CustomTaskQuery.java

示例11: AttachmentQuery

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public AttachmentQuery(ManagementService managementService) {
    super(managementService);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:4,代码来源:AttachmentQuery.java

示例12: getManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
@Override
public ManagementService getManagementService() {
    return managementService;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:5,代码来源:ProcessEngineConfigurationImpl.java

示例13: setManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public ProcessEngineConfigurationImpl setManagementService(ManagementService managementService) {
    this.managementService = managementService;
    return this;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:5,代码来源:ProcessEngineConfigurationImpl.java

示例14: AbstractQuery

import org.activiti.engine.ManagementService; //导入依赖的package包/类
public AbstractQuery(ManagementService managementService) {
    this(((ManagementServiceImpl) managementService).getCommandExecutor());
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:4,代码来源:AbstractQuery.java

示例15: activitiManagementService

import org.activiti.engine.ManagementService; //导入依赖的package包/类
@Bean
public ManagementService activitiManagementService(ProcessEngine activitiProcessEngine) throws Exception
{
    return activitiProcessEngine.getManagementService();
}
 
开发者ID:FINRAOS,项目名称:herd,代码行数:6,代码来源:ServiceSpringModuleConfig.java


注:本文中的org.activiti.engine.ManagementService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。