public void execute(ProcessEngine engine, string scenarioName) { CaseService caseService = engine.CaseService; CaseInstance caseInstance = caseService.createCaseInstanceByKey("case", scenarioName); string caseInstanceId = caseInstance.Id; CaseExecutionQuery query = caseService.createCaseExecutionQuery().caseInstanceId(caseInstanceId); string firstHumanTaskId = query.activityId("PI_HumanTask_1").singleResult().Id; caseService.manuallyStartCaseExecution(firstHumanTaskId); caseService.completeCaseExecution(firstHumanTaskId); string secondHumanTaskId = query.activityId("PI_HumanTask_2").singleResult().Id; caseService.manuallyStartCaseExecution(secondHumanTaskId); }
public void execute(ProcessEngine engine, string scenarioName) { CaseService caseService = engine.CaseService; caseService.createCaseInstanceByKey("case", scenarioName); }