use of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceAuthorizationTest method testQueryAfterStandaloneTask.
// historic task instance query (standalone task) ///////////////////////////////////////
public void testQueryAfterStandaloneTask() {
// given
String taskId = "myTask";
createTask(taskId);
// when
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
// then
verifyQueryResults(query, 1);
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceAuthorizationTest method testDeleteStandaloneTask.
// delete historic task (standalone task) ///////////////////////
public void testDeleteStandaloneTask() {
// given
String taskId = "myTask";
createTask(taskId);
// when
historyService.deleteHistoricTaskInstance(taskId);
// then
disableAuthorization();
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery().taskId(taskId);
verifyQueryResults(query, 0);
enableAuthorization();
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceAuthorizationTest method testQueryWithReadHistoryPermissionOnAnyProcessDefinition.
public void testQueryWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY);
startProcessInstanceByKey(PROCESS_KEY);
startProcessInstanceByKey(PROCESS_KEY);
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY);
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY);
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY);
startProcessInstanceByKey(MESSAGE_START_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
// then
verifyQueryResults(query, 7);
}
use of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceAuthorizationTest method testSimpleQueryWithoutAuthorization.
// historic task instance query (process task) //////////////////////////////////////////
public void testSimpleQueryWithoutAuthorization() {
// given
startProcessInstanceByKey(PROCESS_KEY);
// when
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceAuthorizationTest method testQueryAfterCaseTask.
// historic task instance query (case task) ///////////////////////////////////////
public void testQueryAfterCaseTask() {
// given
createCaseInstanceByKey(CASE_KEY);
// when
HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();
// then
verifyQueryResults(query, 1);
}
Aggregations