if (taskControllerDelegation != null) {
TaskControllerHandler taskControllerHandler = (TaskControllerHandler) taskControllerDelegation.instantiate();
ProcessInstance processInstance = taskInstance.getTaskMgmtInstance().getProcessInstance();
ContextInstance contextInstance = (processInstance != null ? processInstance.getContextInstance() : null);
Token token = taskInstance.getToken();
if (UserCodeInterceptorConfig.userCodeInterceptor != null) {
UserCodeInterceptorConfig.userCodeInterceptor.executeTaskControllerInitialization(taskControllerHandler, taskInstance, contextInstance, token);
} else {
taskControllerHandler.initializeTaskVariables(taskInstance, contextInstance, token);
}
} else {
Token token = taskInstance.getToken();
ProcessInstance processInstance = token.getProcessInstance();
ContextInstance contextInstance = processInstance.getContextInstance();
if (variableAccesses != null) {
for (VariableAccess variableAccess : variableAccesses) {
String mappedName = variableAccess.getMappedName();