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


Java CaseService.createCaseInstanceByKey方法代码示例

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


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

示例1: completeStage

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@DescribesScenario("triggerStageEntryCriterion")
public static ScenarioSetup completeStage() {
  return new ScenarioSetup() {
    public void execute(ProcessEngine engine, String scenarioName) {
      CaseService caseService = engine.getCaseService();
      CaseInstance caseInstance = caseService.createCaseInstanceByKey("case", scenarioName);
      String caseInstanceId = caseInstance.getId();
      
      CaseExecutionQuery query = caseService.createCaseExecutionQuery().caseInstanceId(caseInstanceId);

      String firstHumanTaskId = query.activityId("PI_HumanTask_1").singleResult().getId();
      caseService.manuallyStartCaseExecution(firstHumanTaskId);
      caseService.completeCaseExecution(firstHumanTaskId);

      String secondHumanTaskId = query.activityId("PI_HumanTask_2").singleResult().getId();
      caseService.manuallyStartCaseExecution(secondHumanTaskId);
    }
  };
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:SentryScenario.java

示例2: newSentryInstance

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@DescribesScenario("newSentryInstance")
public static ScenarioSetup newSentryInstance() {
  return new ScenarioSetup() {
    public void execute(ProcessEngine engine, String scenarioName) {
      CaseService caseService = engine.getCaseService();
      CaseInstance caseInstance = caseService.createCaseInstanceByKey("case", scenarioName);
      String caseInstanceId = caseInstance.getId();
      
      CaseExecutionQuery query = caseService.createCaseExecutionQuery().caseInstanceId(caseInstanceId);

      String firstHumanTaskId = query.activityId("PI_HumanTask_1").singleResult().getId();
      caseService.manuallyStartCaseExecution(firstHumanTaskId);
      caseService.completeCaseExecution(firstHumanTaskId);

      String secondHumanTaskId = query.activityId("PI_HumanTask_2").singleResult().getId();
      caseService.manuallyStartCaseExecution(secondHumanTaskId);
      caseService.completeCaseExecution(secondHumanTaskId);
    }
  };
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:21,代码来源:SentryScenario.java

示例3: assigneToMe

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@Test
public void assigneToMe() {
  CaseService caseService = processEngine().getCaseService();
  CaseInstance caseInstance = caseService.createCaseInstanceByKey("Case");

  Task task = taskService().createTaskQuery().caseInstanceId(caseInstance.getId()).singleResult();
  assertThat(task).isAssignedTo("me");

  CaseExecution caseExecution = caseService.createCaseExecutionQuery().activityId("_ab60407c-449e-4048-ba9c-01bb59f2f095").singleResult();
  caseService.completeCaseExecution(caseExecution.getId());
}
 
开发者ID:camunda,项目名称:camunda-bpm-reactor,代码行数:12,代码来源:CaseTest.java

示例4: startCaseInstance

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@PostDeploy
public void startCaseInstance(ProcessEngine processEngine) {
  CaseService caseService = processEngine.getCaseService();
  caseService.createCaseInstanceByKey("loan_application",
      Variables.createVariables()
        .putValue("applicationSufficient", Variables.booleanValue(null))
        .putValue("rating", Variables.integerValue(null)));

}
 
开发者ID:camunda,项目名称:camunda-get-started-cmmn,代码行数:10,代码来源:LoanApprovalApplication.java

示例5: triggerEntryCriterion

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@DescribesScenario("triggerTaskEntryCriterion")
public static ScenarioSetup triggerEntryCriterion() {
  return new ScenarioSetup() {
    public void execute(ProcessEngine engine, String scenarioName) {
      CaseService caseService = engine.getCaseService();
      caseService.createCaseInstanceByKey("case", scenarioName);
    }
  };
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:SentryScenario.java

示例6: completeInstance

import org.camunda.bpm.engine.CaseService; //导入方法依赖的package包/类
@DescribesScenario("completeInstance")
public static ScenarioSetup completeInstance() {
  return new ScenarioSetup() {
    public void execute(ProcessEngine engine, String scenarioName) {
      CaseService caseService = engine.getCaseService();
      caseService.createCaseInstanceByKey("case", scenarioName);
    }
  };
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:SentryScenario.java


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