public virtual void getCompletedHistoricDecisionInstances() { // given start process and evaluate decision VariableMap variables = Variables.createVariables(); variables.put("input1", null); runtimeService.startProcessInstanceByKey("testProcess", variables); // when IList <HistoricDecisionInstance> decisionInstances = optimizeService.getHistoricDecisionInstances(pastDate(), null, 10); // then assertThat(decisionInstances.Count, @is(1)); assertThatDecisionsHaveAllImportantInformation(decisionInstances); }
public virtual void testGetDecisionInstancesWithoutAuthorization() { // given VariableMap variables = Variables.createVariables(); variables.put("input1", null); startProcessInstanceByKey("testProcess", variables); try { // when optimizeService.getHistoricDecisionInstances(new DateTime(0L), null, 10); fail("Exception expected: It should not be possible to retrieve the decision instances"); } catch (AuthorizationException e) { // then string exceptionMessage = e.Message; assertTextPresent(userId, exceptionMessage); assertTextPresent(READ_HISTORY.Name, exceptionMessage); assertTextPresent(DECISION_DEFINITION.resourceName(), exceptionMessage); } }