• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EngineServices类的典型用法和代码示例

java 1次浏览

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

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

示例1: getEngineServices

点赞 3

import org.activiti.engine.EngineServices; //导入依赖的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: mockProcessStartTime

点赞 2

import org.activiti.engine.EngineServices; //导入依赖的package包/类
public void mockProcessStartTime() throws Exception {
    HistoricProcessInstanceQuery query = Mockito.mock(HistoricProcessInstanceQuery.class);
    HistoryService service = Mockito.mock(HistoryService.class);
    when(service.createHistoricProcessInstanceQuery()).thenReturn(query);
    when(query.processInstanceId(PROCESS_ID)).thenReturn(query);
    EngineServices services = context.getEngineServices();
    when(services.getHistoryService()).thenReturn(service);
    HistoricProcessInstance processInstance = Mockito.mock(HistoricProcessInstance.class);
    when(processInstance.getStartTime()).thenReturn(new Date(0));
    when(query.singleResult()).thenReturn(processInstance);
}
 

开发者ID:SAP,
项目名称:cf-mta-deploy-service,
代码行数:12,
代码来源:AnalyticsCollectorTest.java

示例3: notify

点赞 2

import org.activiti.engine.EngineServices; //导入依赖的package包/类
@Override
public void notify(DelegateTask delegateTask) {
    String originAssginee = delegateTask.getAssignee();
    String newUser = userMap.get(originAssginee);
    if (StringUtils.isNotBlank(newUser)) {
        delegateTask.setAssignee(newUser);
        EngineServices engineServices = delegateTask.getExecution().getEngineServices();
        TaskService taskService = engineServices.getTaskService();
        String message = getClass().getName() + "-> 任务[" + delegateTask.getName() + "]的办理人[" + originAssginee + "]自动转办给了用户[" + newUser + "]";
        taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "delegate", message);
    } else {
        System.out.println("任务[" + delegateTask.getName() + "]没有预设的代办人");
    }
}
 

开发者ID:shawn-gogh,
项目名称:myjavacode,
代码行数:15,
代码来源:TaskAutoRedirectListener.java

示例4: getEngineServices

点赞 2

import org.activiti.engine.EngineServices; //导入依赖的package包/类
@Override
public EngineServices getEngineServices() {
    return event.getEngineServices();
}
 

开发者ID:SAP,
项目名称:cf-mta-deploy-service,
代码行数:5,
代码来源:ActivitiEventToDelegateExecutionAdapter.java

示例5: getEngineServices

点赞 2

import org.activiti.engine.EngineServices; //导入依赖的package包/类
public EngineServices getEngineServices() {
  return Context.getProcessEngineConfiguration();
}
 

开发者ID:springvelocity,
项目名称:xbpm5,
代码行数:4,
代码来源:ExecutionImpl.java

示例6: getEngineServices

点赞 1

import org.activiti.engine.EngineServices; //导入依赖的package包/类
/**
 * All Activiti services can be accessed through this interface.
 */
EngineServices getEngineServices();
 

开发者ID:springvelocity,
项目名称:xbpm5,
代码行数:5,
代码来源:DelegateExecution.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)