use of org.camunda.bpm.engine.variable.value.TypedValue in project camunda-bpm-platform by camunda.
the class TaskAuthorizationTest method testProcessTaskGetVariableTypedWithReadTaskPermissionOnAnyProcessDefinition.
public void testProcessTaskGetVariableTypedWithReadTaskPermissionOnAnyProcessDefinition() {
// given
startProcessInstanceByKey(PROCESS_KEY, getVariables());
String taskId = selectSingleTask().getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_TASK);
// 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 ProcessInstanceAuthorizationTest method testGetVariableTypedWithReadPermissionOnProcessInstance.
public void testGetVariableTypedWithReadPermissionOnProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, READ);
// when
TypedValue typedValue = runtimeService.getVariableTyped(processInstanceId, 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 ProcessInstanceAuthorizationTest method testGetVariableTypedWithReadInstancePermissionOnProcessDefinition.
public void testGetVariableTypedWithReadInstancePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_INSTANCE);
// when
TypedValue typedValue = runtimeService.getVariableTyped(processInstanceId, 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 ProcessInstanceAuthorizationTest method testGetVariableLocalTypedWithReadInstancePermissionOnAnyProcessDefinition.
public void testGetVariableLocalTypedWithReadInstancePermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_INSTANCE);
// when
TypedValue typedValue = runtimeService.getVariableLocalTyped(processInstanceId, 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 GetSerializedValueDelegate method execute.
public void execute(DelegateExecution execution) throws Exception {
TypedValue typedValue = execution.getVariableTyped("varName", false);
Assert.assertNotNull(typedValue);
}
Aggregations