use of org.camunda.bpm.engine.runtime.VariableInstanceQuery in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testProcessTaskSetVariablesWithReadTaskPermissionOnAnyProcessDefinition.
public void testProcessTaskSetVariablesWithReadTaskPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY);
String taskId = selectSingleTask().getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, UPDATE_TASK);
// when
taskService.setVariables(taskId, getVariables());
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 1);
enableAuthorization();
}
use of org.camunda.bpm.engine.runtime.VariableInstanceQuery in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testStandaloneTaskSetVariableLocalWithReadPermissionOnTask.
public void testStandaloneTaskSetVariableLocalWithReadPermissionOnTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, taskId, userId, UPDATE);
// when
taskService.setVariableLocal(taskId, VARIABLE_NAME, VARIABLE_VALUE);
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 1);
enableAuthorization();
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.runtime.VariableInstanceQuery in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testProcessTaskRemoveVariablesWithReadInstancePermissionOnProcessDefinition.
public void testProcessTaskRemoveVariablesWithReadInstancePermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
String taskId = selectSingleTask().getId();
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, UPDATE_TASK);
// when
taskService.removeVariables(taskId, Arrays.asList(VARIABLE_NAME));
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 0);
enableAuthorization();
}
use of org.camunda.bpm.engine.runtime.VariableInstanceQuery in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testCaseTaskSetVariablesLocal.
// TaskService#setVariablesLocal() (case task) /////////////////////////////////////
public void testCaseTaskSetVariablesLocal() {
// given
createCaseInstanceByKey(CASE_KEY);
String taskId = selectSingleTask().getId();
// when
taskService.setVariablesLocal(taskId, getVariables());
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 1);
enableAuthorization();
}
use of org.camunda.bpm.engine.runtime.VariableInstanceQuery in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testProcessTaskSetVariablesLocalWithReadTaskPermissionOnProcessDefinition.
public void testProcessTaskSetVariablesLocalWithReadTaskPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY);
String taskId = selectSingleTask().getId();
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, UPDATE_TASK);
// when
taskService.setVariablesLocal(taskId, getVariables());
// then
disableAuthorization();
VariableInstanceQuery query = runtimeService.createVariableInstanceQuery();
verifyQueryResults(query, 1);
enableAuthorization();
}
Aggregations