use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class ExecutionEntity method provideTenantId.
protected void provideTenantId(Map<String, Object> variables) {
if (tenantId == null) {
TenantIdProvider tenantIdProvider = Context.getProcessEngineConfiguration().getTenantIdProvider();
if (tenantIdProvider != null) {
VariableMap variableMap = Variables.fromMap(variables);
ProcessDefinition processDefinition = getProcessDefinition();
TenantIdProviderProcessInstanceContext ctx;
if (superExecutionId != null) {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap, getSuperExecution());
} else if (superCaseExecutionId != null) {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap, getSuperCaseExecution());
} else {
ctx = new TenantIdProviderProcessInstanceContext(processDefinition, variableMap);
}
tenantId = tenantIdProvider.provideTenantIdForProcessInstance(ctx);
}
}
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class FormAuthorizationTest method testProcessTaskGetTaskFormVariables.
public void testProcessTaskGetTaskFormVariables() {
// given
startProcessInstanceByKey(RENDERED_FORM_PROCESS_KEY);
String taskId = selectSingleTask().getId();
createGrantAuthorization(TASK, taskId, userId, READ);
createGrantAuthorization(PROCESS_DEFINITION, RENDERED_FORM_PROCESS_KEY, userId, READ_TASK);
// when
VariableMap variables = formService.getTaskFormVariables(taskId);
// then
assertNotNull(variables);
assertEquals(1, variables.size());
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class FormAuthorizationTest method testGetStartFormVariables.
public void testGetStartFormVariables() {
// given
String processDefinitionId = selectProcessDefinitionByKey(RENDERED_FORM_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, RENDERED_FORM_PROCESS_KEY, userId, READ);
// when
VariableMap variables = formService.getStartFormVariables(processDefinitionId);
// then
assertNotNull(variables);
assertEquals(1, variables.size());
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class FormAuthorizationTest method testProcessTaskGetTaskFormVariablesWithReadPermissionOnTask.
public void testProcessTaskGetTaskFormVariablesWithReadPermissionOnTask() {
// given
startProcessInstanceByKey(RENDERED_FORM_PROCESS_KEY);
String taskId = selectSingleTask().getId();
createGrantAuthorization(TASK, taskId, userId, READ);
// when
VariableMap variables = formService.getTaskFormVariables(taskId);
// then
assertNotNull(variables);
assertEquals(1, variables.size());
}
use of org.camunda.bpm.engine.variable.VariableMap in project camunda-bpm-platform by camunda.
the class FormAuthorizationTest method testStandaloneTaskGetTaskFormVariables.
public void testStandaloneTaskGetTaskFormVariables() {
// given
String taskId = "myTask";
createTask(taskId);
createGrantAuthorization(TASK, taskId, userId, READ);
// when
VariableMap variables = formService.getTaskFormVariables(taskId);
// then
assertNotNull(variables);
deleteTask(taskId, true);
}
Aggregations