use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ProcessInstanceAuthorizationTest method testGetVariablesLocalTypedWithReadPermissionOnAnyProcessInstance.
public void testGetVariablesLocalTypedWithReadPermissionOnAnyProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, READ);
// when
VariableMap variables = runtimeService.getVariablesLocalTyped(processInstanceId);
// then
assertNotNull(variables);
assertFalse(variables.isEmpty());
assertEquals(1, variables.size());
assertEquals(VARIABLE_VALUE, variables.get(VARIABLE_NAME));
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ProcessInstanceAuthorizationTest method testGetVariablesTypedWithReadPermissionOnAnyProcessInstance.
public void testGetVariablesTypedWithReadPermissionOnAnyProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, READ);
// when
VariableMap variables = runtimeService.getVariablesTyped(processInstanceId);
// then
assertNotNull(variables);
assertFalse(variables.isEmpty());
assertEquals(1, variables.size());
assertEquals(VARIABLE_VALUE, variables.get(VARIABLE_NAME));
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ProcessInstanceAuthorizationTest method testGetVariablesTypedWithReadInstancePermissionOnAnyProcessDefinition.
public void testGetVariablesTypedWithReadInstancePermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_INSTANCE);
// when
VariableMap variables = runtimeService.getVariablesTyped(processInstanceId);
// then
assertNotNull(variables);
assertFalse(variables.isEmpty());
assertEquals(1, variables.size());
assertEquals(VARIABLE_VALUE, variables.get(VARIABLE_NAME));
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ProcessInstanceAuthorizationTest method testGetVariablesTypedByNameWithReadInstancePermissionOnProcessDefinition.
public void testGetVariablesTypedByNameWithReadInstancePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_INSTANCE);
// when
VariableMap variables = runtimeService.getVariablesTyped(processInstanceId, Arrays.asList(VARIABLE_NAME), false);
// then
assertNotNull(variables);
assertFalse(variables.isEmpty());
assertEquals(1, variables.size());
assertEquals(VARIABLE_VALUE, variables.get(VARIABLE_NAME));
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ProcessInstanceAuthorizationTest method testGetVariablesLocalTypedByNameWithReadInstancePermissionOnProcessDefinition.
public void testGetVariablesLocalTypedByNameWithReadInstancePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(PROCESS_KEY, getVariables()).getId();
createGrantAuthorization(PROCESS_DEFINITION, PROCESS_KEY, userId, READ_INSTANCE);
// when
VariableMap variables = runtimeService.getVariablesLocalTyped(processInstanceId, Arrays.asList(VARIABLE_NAME), false);
// then
assertNotNull(variables);
assertFalse(variables.isEmpty());
assertEquals(1, variables.size());
assertEquals(VARIABLE_VALUE, variables.get(VARIABLE_NAME));
}
Aggregations