Exemple #1
0
        public virtual void testGetRunningTasksWithoutAuthorization()
        {
            // given
            startProcessInstanceByKey("process");

            try
            {
                // when
                optimizeService.getRunningHistoricTaskInstances(new DateTime(0L), null, 10);
                fail("Exception expected: It should not be possible to retrieve the tasks");
            }
            catch (AuthorizationException e)
            {
                // then
                string exceptionMessage = e.Message;
                assertTextPresent(userId, exceptionMessage);
                assertTextPresent(READ_HISTORY.Name, exceptionMessage);
                assertTextPresent(PROCESS_DEFINITION.resourceName(), exceptionMessage);
            }
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void getRunningHistoricTaskInstances()
        public virtual void getRunningHistoricTaskInstances()
        {
            // given
            BpmnModelInstance simpleDefinition = Bpmn.createExecutableProcess("process").startEvent("startEvent").userTask("userTask").name("task").camundaAssignee(userId).endEvent("endEvent").done();

            testHelper.deploy(simpleDefinition);
            runtimeService.startProcessInstanceByKey("process");

            // when
            IList <HistoricTaskInstance> runningHistoricTaskInstances = optimizeService.getRunningHistoricTaskInstances(null, null, 10);

            // then
            assertThat(runningHistoricTaskInstances.Count, @is(1));
            assertThatTasksHaveAllImportantInformation(runningHistoricTaskInstances[0]);
        }