use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testQueryWithoutAuthorization.
// historic variable instance query (multiple process instances) ////////////////////////
public void testQueryWithoutAuthorization() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testQueryAfterCaseVariables.
// historic variable instance query (case variables) /////////////////////////////////////////////
public void testQueryAfterCaseVariables() {
// given
createCaseInstanceByKey(CASE_KEY, getVariables());
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testSimpleQueryWithMultiple.
public void testSimpleQueryWithMultiple() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testQueryAfterStandaloneTaskVariables.
// historic variable instance query (standalone task) /////////////////////////////////////////////
public void testQueryAfterStandaloneTaskVariables() {
// given
String taskId = "myTask";
createTask(taskId);
disableAuthorization();
taskService.setVariables(taskId, getVariables());
enableAuthorization();
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 1);
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.history.HistoricVariableInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceAuthorizationTest method testQueryWithReadHistoryPermissionOnProcessDefinition.
public void testQueryWithReadHistoryPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY, getVariables());
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
// then
verifyQueryResults(query, 3);
}
Aggregations