use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testStandaloneTaskGetVariableTypedWithReadPermissionOnTask.
public void testStandaloneTaskGetVariableTypedWithReadPermissionOnTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, taskId, userId, READ);
disableAuthorization();
taskService.setVariables(taskId, getVariables());
enableAuthorization();
// when
TypedValue typedValue = taskService.getVariableTyped(taskId, VARIABLE_NAME);
// then
assertNotNull(typedValue);
assertEquals(VARIABLE_VALUE, typedValue.getValue());
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testStandaloneTaskGetVariableLocalTypedWithReadPermissionOnAnyTask.
public void testStandaloneTaskGetVariableLocalTypedWithReadPermissionOnAnyTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, ANY, userId, READ);
disableAuthorization();
taskService.setVariables(taskId, getVariables());
enableAuthorization();
// when
TypedValue typedValue = taskService.getVariableLocalTyped(taskId, VARIABLE_NAME);
// then
assertNotNull(typedValue);
assertEquals(VARIABLE_VALUE, typedValue.getValue());
deleteTask(taskId, true);
}
use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testProcessTaskGetVariableTypedWithReadPermissionOnAnyTask.
public void testProcessTaskGetVariableTypedWithReadPermissionOnAnyTask() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
String taskId = selectSingleTask().getId();
createGrantAuthorization(TASK, ANY, userId, READ);
// when
TypedValue typedValue = taskService.getVariableTyped(taskId, VARIABLE_NAME);
// then
assertNotNull(typedValue);
assertEquals(VARIABLE_VALUE, typedValue.getValue());
}
use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testCaseTaskGetVariableLocalTyped.
// TaskService#getVariableLocalTyped() (case task) ////////////////////////////////////////////
public void testCaseTaskGetVariableLocalTyped() {
// given
createCaseInstanceByKey(CASE_KEY, getVariables());
String taskId = selectSingleTask().getId();
disableAuthorization();
taskService.setVariablesLocal(taskId, getVariables());
enableAuthorization();
// when
TypedValue typedValue = taskService.getVariableLocalTyped(taskId, VARIABLE_NAME);
// then
assertNotNull(typedValue);
assertEquals(VARIABLE_VALUE, typedValue.getValue());
}
use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testStandaloneTaskGetVariableTypedWithReadPermissionOnAnyTask.
public void testStandaloneTaskGetVariableTypedWithReadPermissionOnAnyTask() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, ANY, userId, READ);
disableAuthorization();
taskService.setVariables(taskId, getVariables());
enableAuthorization();
// when
TypedValue typedValue = taskService.getVariableTyped(taskId, VARIABLE_NAME);
// then
assertNotNull(typedValue);
assertEquals(VARIABLE_VALUE, typedValue.getValue());
deleteTask(taskId, true);
}
Aggregations