Search in sources :

Example 31 with UserOperationLogQuery

use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.

the class UserOperationLogAuthorizationTest method testQuerySuspendProcessInstanceUserOperationLogWithReadHistoryPermissionOnProcessDefinition.

public void testQuerySuspendProcessInstanceUserOperationLogWithReadHistoryPermissionOnProcessDefinition() {
    // given
    String processInstanceId = startProcessInstanceByKey(ONE_TASK_PROCESS_KEY).getId();
    suspendProcessInstanceById(processInstanceId);
    createGrantAuthorization(PROCESS_DEFINITION, ONE_TASK_PROCESS_KEY, userId, READ_HISTORY);
    // when
    UserOperationLogQuery query = historyService.createUserOperationLogQuery();
    // then
    verifyQueryResults(query, 1);
    clearDatabase();
}
Also used : UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Example 32 with UserOperationLogQuery

use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.

the class UserOperationLogAuthorizationTest method testQuerySuspendProcessDefinitionUserOperationLogWithReadHistoryPermissionOnProcessDefinition.

public void testQuerySuspendProcessDefinitionUserOperationLogWithReadHistoryPermissionOnProcessDefinition() {
    // given
    suspendProcessDefinitionByKey(ONE_TASK_PROCESS_KEY);
    createGrantAuthorization(PROCESS_DEFINITION, ONE_TASK_PROCESS_KEY, userId, READ_HISTORY);
    // when
    UserOperationLogQuery query = historyService.createUserOperationLogQuery();
    // then
    verifyQueryResults(query, 1);
    clearDatabase();
}
Also used : UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Example 33 with UserOperationLogQuery

use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.

the class UserOperationLogAuthorizationTest method testQuerySetAssigneeTaskUserOperationLogWithReadHistoryPermissionOnAnyProcessDefinition.

public void testQuerySetAssigneeTaskUserOperationLogWithReadHistoryPermissionOnAnyProcessDefinition() {
    // given
    startProcessInstanceByKey(ONE_TASK_PROCESS_KEY);
    String taskId = selectSingleTask().getId();
    setAssignee(taskId, "demo");
    createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
    // when
    UserOperationLogQuery query = historyService.createUserOperationLogQuery();
    // then
    verifyQueryResults(query, 1);
}
Also used : UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Example 34 with UserOperationLogQuery

use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.

the class UserOperationLogAuthorizationTest method testQuerySetAssigneeStandaloneTaskUserOperationLog.

public void testQuerySetAssigneeStandaloneTaskUserOperationLog() {
    // given
    String taskId = "myTask";
    createTask(taskId);
    setAssignee(taskId, "demo");
    // when
    UserOperationLogQuery query = historyService.createUserOperationLogQuery();
    // then
    verifyQueryResults(query, 2);
    deleteTask(taskId, true);
}
Also used : UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Example 35 with UserOperationLogQuery

use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.

the class UserOperationLogAuthorizationTest method testQuerySetAssigneeHumanTaskUserOperationLog.

// (case) human task /////////////////////////////
public void testQuerySetAssigneeHumanTaskUserOperationLog() {
    // given
    createCaseInstanceByKey(ONE_TASK_CASE_KEY);
    String taskId = selectSingleTask().getId();
    setAssignee(taskId, "demo");
    // when
    UserOperationLogQuery query = historyService.createUserOperationLogQuery();
    // then
    verifyQueryResults(query, 1);
}
Also used : UserOperationLogQuery(org.camunda.bpm.engine.history.UserOperationLogQuery)

Aggregations

UserOperationLogQuery (org.camunda.bpm.engine.history.UserOperationLogQuery)67 Deployment (org.camunda.bpm.engine.test.Deployment)25 UserOperationLogEntry (org.camunda.bpm.engine.history.UserOperationLogEntry)20 Deployment (org.camunda.bpm.engine.repository.Deployment)10 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)6 Task (org.camunda.bpm.engine.task.Task)4 Date (java.util.Date)2 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)2 Batch (org.camunda.bpm.engine.batch.Batch)2 UserOperationLogQueryDto (org.camunda.bpm.engine.rest.dto.history.UserOperationLogQueryDto)2 RequiredHistoryLevel (org.camunda.bpm.engine.test.RequiredHistoryLevel)2 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)2 Test (org.junit.Test)2 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)1