@Deployment(resources = { DECISION_PROCESS, DECISION_COLLECT_SUM_DMN }) public void testCollectResultValue() { startProcessInstanceAndEvaluateDecision(); HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().singleResult(); assertThat(historicDecisionInstance.getCollectResultValue(), is(notNullValue())); assertThat(historicDecisionInstance.getCollectResultValue(), is(3.0)); }
public static HistoricDecisionInstance createMockHistoricDecisionInstanceBase(String tenantId) { HistoricDecisionInstance mock = mock(HistoricDecisionInstance.class); when(mock.getId()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_ID); when(mock.getDecisionDefinitionId()).thenReturn(EXAMPLE_DECISION_DEFINITION_ID); when(mock.getDecisionDefinitionKey()).thenReturn(EXAMPLE_DECISION_DEFINITION_KEY); when(mock.getDecisionDefinitionName()).thenReturn(EXAMPLE_DECISION_DEFINITION_NAME); when(mock.getProcessDefinitionId()).thenReturn(EXAMPLE_PROCESS_DEFINITION_ID); when(mock.getProcessDefinitionKey()).thenReturn(EXAMPLE_PROCESS_DEFINITION_KEY); when(mock.getProcessInstanceId()).thenReturn(EXAMPLE_PROCESS_INSTANCE_ID); when(mock.getCaseDefinitionId()).thenReturn(EXAMPLE_CASE_DEFINITION_ID); when(mock.getCaseDefinitionKey()).thenReturn(EXAMPLE_CASE_DEFINITION_KEY); when(mock.getCaseInstanceId()).thenReturn(EXAMPLE_CASE_INSTANCE_ID); when(mock.getActivityId()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_ACTIVITY_ID); when(mock.getActivityInstanceId()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_ACTIVITY_INSTANCE_ID); when(mock.getEvaluationTime()).thenReturn(DateTimeUtil.parseDate(EXAMPLE_HISTORIC_DECISION_INSTANCE_EVALUATION_TIME)); when(mock.getRemovalTime()).thenReturn(DateTimeUtil.parseDate(EXAMPLE_HISTORIC_DECISION_INSTANCE_REMOVAL_TIME)); when(mock.getUserId()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_USER_ID); when(mock.getCollectResultValue()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_COLLECT_RESULT_VALUE); when(mock.getRootDecisionInstanceId()).thenReturn(EXAMPLE_HISTORIC_DECISION_INSTANCE_ID); when(mock.getRootProcessInstanceId()).thenReturn(EXAMPLE_ROOT_HISTORIC_PROCESS_INSTANCE_ID); when(mock.getDecisionRequirementsDefinitionId()).thenReturn(EXAMPLE_DECISION_REQUIREMENTS_DEFINITION_ID); when(mock.getDecisionRequirementsDefinitionKey()).thenReturn(EXAMPLE_DECISION_REQUIREMENTS_DEFINITION_KEY); when(mock.getTenantId()).thenReturn(tenantId); return mock; }
dto.activityInstanceId = historicDecisionInstance.getActivityInstanceId(); dto.userId = historicDecisionInstance.getUserId(); dto.collectResultValue = historicDecisionInstance.getCollectResultValue(); dto.rootDecisionInstanceId = historicDecisionInstance.getRootDecisionInstanceId(); dto.rootProcessInstanceId = historicDecisionInstance.getRootProcessInstanceId();
dto.activityInstanceId = historicDecisionInstance.getActivityInstanceId(); dto.userId = historicDecisionInstance.getUserId(); dto.collectResultValue = historicDecisionInstance.getCollectResultValue(); dto.rootDecisionInstanceId = historicDecisionInstance.getRootDecisionInstanceId(); dto.rootProcessInstanceId = historicDecisionInstance.getRootProcessInstanceId();
@Deployment(resources = { DECISION_PROCESS, DECISION_COLLECT_SUM_DMN }) public void testCollectResultValue() { startProcessInstanceAndEvaluateDecision(); HistoricDecisionInstance historicDecisionInstance = historyService.createHistoricDecisionInstanceQuery().singleResult(); assertThat(historicDecisionInstance.getCollectResultValue(), is(notNullValue())); assertThat(historicDecisionInstance.getCollectResultValue(), is(3.0)); }
dto.activityInstanceId = historicDecisionInstance.getActivityInstanceId(); dto.userId = historicDecisionInstance.getUserId(); dto.collectResultValue = historicDecisionInstance.getCollectResultValue(); dto.rootDecisionInstanceId = historicDecisionInstance.getRootDecisionInstanceId(); dto.rootProcessInstanceId = historicDecisionInstance.getRootProcessInstanceId();