use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailAuthorizationTest method testSimpleVariableUpdateQueryWithReadHistoryPermissionOnProcessDefinition.
public void testSimpleVariableUpdateQueryWithReadHistoryPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricDetailQuery query = historyService.createHistoricDetailQuery().variableUpdates();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailAuthorizationTest method testVariableUpdateQueryWithoutAuthorization.
// historic variable update query (multiple process instances) ///////////////////////////////////////////
public void testVariableUpdateQueryWithoutAuthorization() {
// 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
HistoricDetailQuery query = historyService.createHistoricDetailQuery().variableUpdates();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailAuthorizationTest method testDetailQueryWithoutAuthorization.
// historic detail query (variable update + form field) //////////
public void testDetailQueryWithoutAuthorization() {
// given
startProcessInstanceByKey(PROCESS_KEY);
String taskId = selectSingleTask().getId();
disableAuthorization();
formService.submitTaskForm(taskId, getVariables());
enableAuthorization();
startProcessInstanceByKey(PROCESS_KEY);
taskId = selectSingleTask().getId();
disableAuthorization();
formService.submitTaskForm(taskId, getVariables());
enableAuthorization();
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
startProcessInstanceByKey(PROCESS_KEY, getVariables());
// when
HistoricDetailQuery query = historyService.createHistoricDetailQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailAuthorizationTest method testQueryAfterCaseVariables.
// historic variable update query (case variables) /////////////////////////////////////////////
public void testQueryAfterCaseVariables() {
// given
createCaseInstanceByKey(CASE_KEY, getVariables());
// when
HistoricDetailQuery query = historyService.createHistoricDetailQuery().variableUpdates();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricDetailQuery in project camunda-bpm-platform by camunda.
the class HistoricDetailAuthorizationTest method testMixedQueryWithoutAuthorization.
// historic variable update query (mixed) ////////////////////////////////////
public void testMixedQueryWithoutAuthorization() {
// 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());
createTask("one");
createTask("two");
createTask("three");
createTask("four");
createTask("five");
disableAuthorization();
taskService.setVariables("one", getVariables());
taskService.setVariables("two", getVariables());
taskService.setVariables("three", getVariables());
taskService.setVariables("four", getVariables());
taskService.setVariables("five", getVariables());
enableAuthorization();
createCaseInstanceByKey(CASE_KEY, getVariables());
createCaseInstanceByKey(CASE_KEY, getVariables());
// when
HistoricDetailQuery query = historyService.createHistoricDetailQuery().variableUpdates();
// then
verifyQueryResults(query, 7);
deleteTask("one", true);
deleteTask("two", true);
deleteTask("three", true);
deleteTask("four", true);
deleteTask("five", true);
}
Aggregations