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

Java DecisionService类代码示例

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

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



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

示例1: evaluateDecisionTable

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
@PostDeploy
public void evaluateDecisionTable(ProcessEngine processEngine) {

  DecisionService decisionService = processEngine.getDecisionService();

  VariableMap variables = Variables.createVariables()
    .putValue("season", "Spring")
    .putValue("guestCount", 10)
    .putValue("guestsWithChildren", false);

  DmnDecisionTableResult dishDecisionResult = decisionService.evaluateDecisionTableByKey("dish", variables);
  String desiredDish = dishDecisionResult.getSingleEntry();

  System.out.println("Desired dish: " + desiredDish);

  DmnDecisionTableResult beveragesDecisionResult = decisionService.evaluateDecisionTableByKey("beverages", variables);
  List<Object> beverages = beveragesDecisionResult.collectEntries("beverages");

  System.out.println("Desired beverages: " + beverages);
}
 
开发者ID:camunda,项目名称:camunda-get-started-dmn,代码行数:21,代码来源:DinnerApplication.java


示例2: notify

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
@Override
public void notify(final DelegateTask delegateTask) {
  logger.info("Determining routing for {}", delegateTask.getTaskDefinitionKey());
  final DecisionService decisionService = delegateTask.getProcessEngineServices().getDecisionService();

  final Map<String, Object> vars = delegateTask.getVariables();
  final TaskHolder task = TaskHolder.fromTask(delegateTask);
  final CandidateResult candidateResult = skillBasedRoutingService(decisionService).evaluate(task, vars);

  if (candidateResult != null) {
    delegateTask.addCandidateUsers(candidateResult.getCandidateUsers());
  }
}
 
开发者ID:holisticon,项目名称:skill-based-routing,代码行数:14,代码来源:SkillBasedRoutingListener.java


示例3: evaluateDecisionTable

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
private boolean evaluateDecisionTable(double sum) {
  final DecisionService decisionService = processEngineRule.getDecisionService();
  final DmnDecisionTableResult results = decisionService.evaluateDecisionTableByKey("decision", Variables.createVariables().putValue("status", "silver").putValue("sum", 1500.0d));

  final String result = FluentIterable.from(results).first().get().getEntry("result");

  return "ok".equals(result);
}
 
开发者ID:holisticon,项目名称:skill-based-routing,代码行数:9,代码来源:RedeployAndEvaluateDecisionTest.java


示例4: shouldUseTheDmnTable

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
@Test
public void shouldUseTheDmnTable(){
  DecisionService decisionService = processEngine.getDecisionService();
  VariableMap variableMap = Variables.createVariables().putValue("season", "Spring").putValue("guestCount", 10);
  DmnDecisionTableResult dishDecision = decisionService.evaluateDecisionTableByKey("dish", variableMap);
  String dish = dishDecision.getSingleEntry();

  assertThat(dish, is(equalTo("Stew")));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:10,代码来源:OSGiDmnIntegrationTest.java


示例5: setUpRuntime

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
@Before
public void setUpRuntime() throws FileNotFoundException, URISyntaxException {
  DecisionRequirementsDefinition mockDecisionRequirementsDefinition = MockProvider.createMockDecisionRequirementsDefinition();

  setUpRuntimeData(mockDecisionRequirementsDefinition);
  decisionServiceMock = mock(DecisionService.class);
  when(processEngine.getDecisionService()).thenReturn(decisionServiceMock);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:9,代码来源:DecisionRequirementsDefinitionRestServiceInteractionTest.java


示例6: setUpDecisionService

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
private void setUpDecisionService() {
  decisionEvaluationBuilderMock = mock(DecisionsEvaluationBuilder.class);
  when(decisionEvaluationBuilderMock.variables(anyMapOf(String.class, Object.class))).thenReturn(decisionEvaluationBuilderMock);

  decisionServiceMock = mock(DecisionService.class);
  when(decisionServiceMock.evaluateDecisionById(MockProvider.EXAMPLE_DECISION_DEFINITION_ID)).thenReturn(decisionEvaluationBuilderMock);
  when(decisionServiceMock.evaluateDecisionByKey(MockProvider.EXAMPLE_DECISION_DEFINITION_KEY)).thenReturn(decisionEvaluationBuilderMock);

  when(processEngine.getDecisionService()).thenReturn(decisionServiceMock);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:DecisionDefinitionRestServiceInteractionTest.java


示例7: EvaluateDecisionTable

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
public EvaluateDecisionTable(DecisionService decisionService) {
  this.decisionService = decisionService;
}
 
开发者ID:holisticon,项目名称:holunda,代码行数:4,代码来源:EvaluateDecisionTable.java


示例8: getDecisionService

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


示例9: SkillBasedRoutingService

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
public SkillBasedRoutingService(DecisionService decisionService) {
  this.decisionService = decisionService;
}
 
开发者ID:holisticon,项目名称:skill-based-routing,代码行数:4,代码来源:SkillBasedRoutingService.java


示例10: getDecisionService

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


示例11: getDecisionService

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


示例12: getDecisionService

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


示例13: getDecisionService

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


示例14: getDecisionService

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


示例15: setDecisionService

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


示例16: getDecisionService

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


示例17: execute

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
@Override
public void execute(DelegateExecution execution) throws Exception {
  DecisionService decisionService = execution.getProcessEngineServices().getDecisionService();
  evaluateDecision(decisionService, execution);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:6,代码来源:DecisionServiceDelegate.java


示例18: notify

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
public void notify(DelegateCaseExecution caseExecution) throws Exception {
  DecisionService decisionService = caseExecution.getProcessEngineServices().getDecisionService();
  evaluateDecision(decisionService, caseExecution);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:DecisionServiceDelegate.java


示例19: evaluate

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
public boolean evaluate(DelegateCaseExecution caseExecution) {
  DecisionService decisionService = caseExecution.getProcessEngineServices().getDecisionService();
  DmnDecisionTableResult result = evaluateDecision(decisionService, caseExecution);
  DmnDecisionRuleResult singleResult = result.getSingleResult();
  return (Boolean) singleResult.getSingleEntry();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:7,代码来源:DecisionServiceDelegate.java


示例20: evaluateDecision

import org.camunda.bpm.engine.DecisionService; //导入依赖的package包/类
protected DmnDecisionTableResult evaluateDecision(DecisionService decisionService, VariableScope variableScope) {
  return decisionService.evaluateDecisionTableByKey("testDecision", variableScope.getVariables());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:DecisionServiceDelegate.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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