Пример #1
0
        public virtual void testGetRunningProcessInstancesWithoutAuthorization()
        {
            // given
            startProcessInstanceByKey("process");

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

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

            // when
            IList <HistoricProcessInstance> runningHistoricProcessInstances = optimizeService.getRunningHistoricProcessInstances(pastDate(), null, 10);

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