use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testSimpleQueryWithHistoryReadPermissionOnProcessDefinition.
public void testSimpleQueryWithHistoryReadPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(DEFAULT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, DEFAULT_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testSimpleQueryWithHistoryReadPermissionOnAnyProcessDefinition.
public void testSimpleQueryWithHistoryReadPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(DEFAULT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testSimpleQueryWithMultipleAuthorizations.
public void testSimpleQueryWithMultipleAuthorizations() {
// given
startProcessInstanceByKey(DEFAULT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
createGrantAuthorization(PROCESS_DEFINITION, DEFAULT_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testSimpleQueryWithoutAuthorization.
public void testSimpleQueryWithoutAuthorization() {
// given
startProcessInstanceByKey(DEFAULT_PROCESS_KEY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByRetriesDsc.
@Test
public void testQuerySortingByRetriesDsc() {
// given
int taskCount = 10;
List<ExternalTask> list = startProcesses(taskCount);
reportExternalTaskFailure(list);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
query.failureLog().orderByRetries().desc();
// then
verifyQueryWithOrdering(query, taskCount, inverted(historicExternalTaskLogByRetries()));
}
Aggregations