本文整理汇总了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);
}
};
}
示例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);
}
};
}
示例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());
}
示例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)));
}
示例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);
}
};
}
示例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);
}
};
}