Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
            public void execute(ProcessEngine engine, string scenarioName)
            {
                CaseService caseService = engine.CaseService;

                caseService.createCaseInstanceByKey("case", scenarioName);
            }