• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ExternalTaskService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mockServices

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
private void mockServices(ProcessEngine engine) {
  RepositoryService repoService = mock(RepositoryService.class);
  IdentityService identityService = mock(IdentityService.class);
  TaskService taskService = mock(TaskService.class);
  RuntimeService runtimeService = mock(RuntimeService.class);
  FormService formService = mock(FormService.class);
  HistoryService historyService = mock(HistoryService.class);
  ManagementService managementService = mock(ManagementService.class);
  CaseService caseService = mock(CaseService.class);
  FilterService filterService = mock(FilterService.class);
  ExternalTaskService externalTaskService = mock(ExternalTaskService.class);

  when(engine.getRepositoryService()).thenReturn(repoService);
  when(engine.getIdentityService()).thenReturn(identityService);
  when(engine.getTaskService()).thenReturn(taskService);
  when(engine.getRuntimeService()).thenReturn(runtimeService);
  when(engine.getFormService()).thenReturn(formService);
  when(engine.getHistoryService()).thenReturn(historyService);
  when(engine.getManagementService()).thenReturn(managementService);
  when(engine.getCaseService()).thenReturn(caseService);
  when(engine.getFilterService()).thenReturn(filterService);
  when(engine.getExternalTaskService()).thenReturn(externalTaskService);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:24,代码来源:MockedProcessEngineProvider.java


示例2: getErrorDetails

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public String getErrorDetails() {
  ExternalTaskService externalTaskService = engine.getExternalTaskService();

  try {
    return externalTaskService.getExternalTaskErrorDetails(externalTaskId);
  } catch (NotFoundException e) {
    throw new RestException(Status.NOT_FOUND, e, "External task with id " + externalTaskId + " does not exist");
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ExternalTaskResourceImpl.java


示例3: setRetries

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public void setRetries(RetriesDto dto) {
  ExternalTaskService externalTaskService = engine.getExternalTaskService();

  try {
    externalTaskService.setRetries(externalTaskId, dto.getRetries());
  } catch (NotFoundException e) {
    throw new RestException(Status.NOT_FOUND, e, "External task with id " + externalTaskId + " does not exist");
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ExternalTaskResourceImpl.java


示例4: setPriority

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public void setPriority(PriorityDto dto) {
  ExternalTaskService externalTaskService = engine.getExternalTaskService();

  try {
    externalTaskService.setPriority(externalTaskId, dto.getPriority());
  } catch (NotFoundException e) {
    throw new RestException(Status.NOT_FOUND, e, "External task with id " + externalTaskId + " does not exist");
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ExternalTaskResourceImpl.java


示例5: unlock

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public void unlock() {
  ExternalTaskService externalTaskService = engine.getExternalTaskService();

  try {
    externalTaskService.unlock(externalTaskId);
  } catch (NotFoundException e) {
    throw new RestException(Status.NOT_FOUND, e, "External task with id " + externalTaskId + " does not exist");
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ExternalTaskResourceImpl.java


示例6: updateRetries

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
protected UpdateExternalTaskRetriesBuilder updateRetries(SetRetriesForExternalTasksDto retriesDto) {

    ExternalTaskService externalTaskService = getProcessEngine().getExternalTaskService();

    List<String> externalTaskIds = retriesDto.getExternalTaskIds();
    List<String> processInstanceIds = retriesDto.getProcessInstanceIds();

    ExternalTaskQuery externalTaskQuery = null;
    ProcessInstanceQuery processInstanceQuery = null;
    HistoricProcessInstanceQuery historicProcessInstanceQuery = null;

    ExternalTaskQueryDto externalTaskQueryDto = retriesDto.getExternalTaskQuery();
    if (externalTaskQueryDto != null) {
      externalTaskQuery = externalTaskQueryDto.toQuery(getProcessEngine());
    }

    ProcessInstanceQueryDto processInstanceQueryDto = retriesDto.getProcessInstanceQuery();
    if (processInstanceQueryDto != null) {
      processInstanceQuery = processInstanceQueryDto.toQuery(getProcessEngine());
    }

    HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto = retriesDto.getHistoricProcessInstanceQuery();
    if (historicProcessInstanceQueryDto != null) {
      historicProcessInstanceQuery = historicProcessInstanceQueryDto.toQuery(getProcessEngine());
    }

    return externalTaskService.updateRetries()
      .externalTaskIds(externalTaskIds)
      .processInstanceIds(processInstanceIds)
      .externalTaskQuery(externalTaskQuery)
      .processInstanceQuery(processInstanceQuery)
      .historicProcessInstanceQuery(historicProcessInstanceQuery);
  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:34,代码来源:ExternalTaskRestServiceImpl.java


示例7: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public ExternalTaskService getExternalTaskService() {
  return processEngine.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-assert-scenario,代码行数:4,代码来源:AbstractProcessEngineServicesDelegate.java


示例8: mockExternalTaskQuery

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public static ExternalTaskQueryMock mockExternalTaskQuery(final ExternalTaskService serviceMock) {
  return new ExternalTaskQueryMock().forService(serviceMock);
}
 
开发者ID:camunda,项目名称:camunda-bpm-mockito,代码行数:4,代码来源:QueryMocks.java


示例9: ExternalTaskQueryMock

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public ExternalTaskQueryMock() {
 super(ExternalTaskQuery.class, ExternalTaskService.class);
}
 
开发者ID:camunda,项目名称:camunda-bpm-mockito,代码行数:4,代码来源:ExternalTaskQueryMock.java


示例10: mockExternalTaskQuery

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public static ExternalTaskQueryMock mockExternalTaskQuery(final ExternalTaskService serviceMock) {
  return QueryMocks.mockExternalTaskQuery(serviceMock);
}
 
开发者ID:camunda,项目名称:camunda-bpm-mockito,代码行数:4,代码来源:CamundaMockito.java


示例11: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public ExternalTaskService getExternalTaskService() {
  return innerRule.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineNeedleRule.java


示例12: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public ExternalTaskService getExternalTaskService() {
  return delegate.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineExternalResource.java


示例13: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public ExternalTaskService getExternalTaskService() {
  return outerRule.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineTestWatcher.java


示例14: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public ExternalTaskService getExternalTaskService() {
  return processEngine.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:CamundaInstancesSupplier.java


示例15: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public ExternalTaskService getExternalTaskService() {
  return externalTaskService;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:ProcessEngineConfigurationImpl.java


示例16: setExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
public void setExternalTaskService(ExternalTaskService externalTaskService) {
  this.externalTaskService = externalTaskService;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:ProcessEngineConfigurationImpl.java


示例17: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Override
public ExternalTaskService getExternalTaskService() {
  return externalTaskService;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:ProcessEngineImpl.java


示例18: setUpRuntimeData

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Before
public void setUpRuntimeData() {
  externalTaskService = mock(ExternalTaskService.class);
  when(processEngine.getExternalTaskService()).thenReturn(externalTaskService);

  runtimeServiceMock = mock(RuntimeServiceImpl.class);
  when(processEngine.getRuntimeService()).thenReturn(runtimeServiceMock);

  historyServiceMock = mock(HistoryServiceImpl.class);
  when(processEngine.getHistoryService()).thenReturn(historyServiceMock);

  // locked external task
  lockedExternalTaskMock = MockProvider.createMockLockedExternalTask();

  // fetching
  fetchTopicBuilder = mock(ExternalTaskQueryTopicBuilder.class);
  when(externalTaskService.fetchAndLock(anyInt(), any(String.class))).thenReturn(fetchTopicBuilder);
  when(externalTaskService.fetchAndLock(anyInt(), any(String.class), any(Boolean.class))).thenReturn(fetchTopicBuilder);

  when(fetchTopicBuilder.topic(any(String.class), anyLong())).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.variables(anyListOf(String.class))).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.variables(any(String[].class))).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.enableCustomObjectDeserialization()).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.topic(any(String.class), anyLong())).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.businessKey(any(String.class))).thenReturn(fetchTopicBuilder);
  when(fetchTopicBuilder.processInstanceVariableEquals(anyMapOf(String.class, Object.class))).thenReturn(fetchTopicBuilder);

  Batch batch = createMockBatch();
  updateRetriesBuilder = mock(UpdateExternalTaskRetriesBuilder.class);
  when(externalTaskService.updateRetries()).thenReturn(updateRetriesBuilder);

  when(updateRetriesBuilder.externalTaskIds(anyListOf(String.class))).thenReturn(updateRetriesBuilder);
  when(updateRetriesBuilder.processInstanceIds(anyListOf(String.class))).thenReturn(updateRetriesBuilder);
  when(updateRetriesBuilder.externalTaskQuery(any(ExternalTaskQuery.class))).thenReturn(updateRetriesBuilder);
  when(updateRetriesBuilder.processInstanceQuery(any(ProcessInstanceQuery.class))).thenReturn(updateRetriesBuilder);
  when(updateRetriesBuilder.historicProcessInstanceQuery(any(HistoricProcessInstanceQuery.class))).thenReturn(updateRetriesBuilder);
  when(updateRetriesBuilder.setAsync(anyInt())).thenReturn(batch);

  // querying
  externalTaskQueryMock = mock(ExternalTaskQuery.class);
  when(externalTaskQueryMock.externalTaskId(any(String.class))).thenReturn(externalTaskQueryMock);
  when(externalTaskService.createExternalTaskQuery()).thenReturn(externalTaskQueryMock);

  // external task
  externalTaskMock = MockProvider.createMockExternalTask();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:47,代码来源:ExternalTaskRestServiceInteractionTest.java


示例19: setUpRuntimeData

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Before
public void setUpRuntimeData() {
  namedProcessEngine = getProcessEngine(EXAMPLE_ENGINE_NAME);
  mockRepoService = mock(RepositoryService.class);
  mockRuntimeService = mock(RuntimeService.class);
  mockTaskService = mock(TaskService.class);
  mockIdentityService = mock(IdentityService.class);
  mockManagementService = mock(ManagementService.class);
  mockHistoryService = mock(HistoryService.class);
  mockCaseService = mock(CaseService.class);
  mockFilterService = mock(FilterService.class);
  mockExternalTaskService = mock(ExternalTaskService.class);

  when(namedProcessEngine.getRepositoryService()).thenReturn(mockRepoService);
  when(namedProcessEngine.getRuntimeService()).thenReturn(mockRuntimeService);
  when(namedProcessEngine.getTaskService()).thenReturn(mockTaskService);
  when(namedProcessEngine.getIdentityService()).thenReturn(mockIdentityService);
  when(namedProcessEngine.getManagementService()).thenReturn(mockManagementService);
  when(namedProcessEngine.getHistoryService()).thenReturn(mockHistoryService);
  when(namedProcessEngine.getCaseService()).thenReturn(mockCaseService);
  when(namedProcessEngine.getFilterService()).thenReturn(mockFilterService);
  when(namedProcessEngine.getExternalTaskService()).thenReturn(mockExternalTaskService);

  createProcessDefinitionMock();
  createProcessInstanceMock();
  createTaskMock();
  createIdentityMocks();
  createExecutionMock();
  createVariableInstanceMock();
  createJobDefinitionMock();
  createIncidentMock();
  createDeploymentMock();
  createMessageCorrelationBuilderMock();
  createCaseDefinitionMock();
  createCaseInstanceMock();
  createCaseExecutionMock();
  createFilterMock();
  createExternalTaskMock();

  createHistoricActivityInstanceMock();
  createHistoricProcessInstanceMock();
  createHistoricVariableInstanceMock();
  createHistoricActivityStatisticsMock();
  createHistoricDetailMock();
  createHistoricTaskInstanceMock();
  createHistoricIncidentMock();
  createHistoricJobLogMock();
  createHistoricExternalTaskLogMock();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:50,代码来源:ProcessEngineRestServiceTest.java


示例20: getExternalTaskService

import org.camunda.bpm.engine.ExternalTaskService; //导入依赖的package包/类
@Bean(name = "externalTaskService")
@Override
public ExternalTaskService getExternalTaskService() {
  return processEngine.getExternalTaskService();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:6,代码来源:SpringProcessEngineServicesConfiguration.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Quota类代码示例发布时间:2022-05-22
下一篇:
Java VariableResolverImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap