public Object put(String name, Object value) { if (storeScriptVariables) { Object oldValue = null; if (!UNSTORED_KEYS.contains(name)) { oldValue = variableScope.getVariable(name); variableScope.setVariable(name, value); return oldValue; } } return defaultBindings.put(name, value); }
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; return !variableScope.hasVariable(variable); } return true; }
public boolean hasVariables() { if (transientVariabes != null && !transientVariabes.isEmpty()) { return true; } ensureVariableInstancesInitialized(); if (!variableInstances.isEmpty()) { return true; } VariableScope parentScope = getParentVariableScope(); if (parentScope != null) { return parentScope.hasVariables(); } return false; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } }
return Authentication.getAuthenticatedUserId(); } else { if (variableScope.hasVariable(variable)) { context.setPropertyResolved(true); // if not set, the next VariableInstance variableInstance = variableScope.getVariableInstance(variable); Object value = variableInstance.getValue(); if (("json".equals(variableInstance.getTypeName())
public Object getValue(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; // according to javadoc, can only be a String if ((EXECUTION_KEY.equals(property) && variableScope instanceof ExecutionEntity) || (TASK_KEY.equals(property) && variableScope instanceof TaskEntity)) { context.setPropertyResolved(true); return variableScope; } else if (EXECUTION_KEY.equals(property) && variableScope instanceof TaskEntity) { context.setPropertyResolved(true); return ((TaskEntity) variableScope).getExecution(); } else if (LOGGED_IN_USER_KEY.equals(property)) { context.setPropertyResolved(true); return Authentication.getAuthenticatedUserId(); } else { if (variableScope.hasVariable(variable)) { context.setPropertyResolved(true); // if not set, the next elResolver in the CompositeElResolver will be called return variableScope.getVariable(variable); } } } // property resolution (eg. bean.value) will be done by the // BeanElResolver (part of the CompositeElResolver) // It will use the bean resolved in this resolver as base. return null; }
public Object get(Object key) { if (variableScopeKey.equals(key)) { return variableScope; } else if (processEngineConfigurationKey.equals(key)) { return processEngineConfiguration; } else if (runtimeServiceKey.equals(key)) { return processEngineConfiguration.getRuntimeService(); } else if (taskServiceKey.equals(key)) { return processEngineConfiguration.getTaskService(); } else if (repositoryServiceKey.equals(key)) { return processEngineConfiguration.getRepositoryService(); } else if (managementServiceKey.equals(key)) { return processEngineConfiguration.getManagementService(); } return variableScope.getVariable((String) key); } }
private MultiInstanceActivityBehavior getMultiInstanceActivityBehavior(VariableScope execution) { String mode = (String)execution.getVariable(this.multiInstanceMode_variable); if(mode == null) mode = (String)execution.getVariableLocal(this.multiInstanceMode_variable); if(mode == null) { if(execution instanceof ActivityExecution) { return ((ActivityExecution)execution).getTaskContext().isIsparrel()?innerParallelActivityBehavior:innerSequentialActivityBehavior; } else return this.defaultMultiInstanceActivityBehavior; } if(mode.equals(multiInstanceMode_parallel)) { return this.innerParallelActivityBehavior; } else { return this.innerSequentialActivityBehavior; } }
public Collection<Object> values() { return variableScope.getVariables().values(); }
requestedVariables.putAll(parent.getVariableInstances(variableNamesToFetch, fetchAllVariables));
return parentScope.getVariableInstance(variableName, true); return parentScope.getVariableInstance(variableName, false);
public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } }
public Object getValue(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; // according to javadoc, can only be a String if( (EXECUTION_KEY.equals(property) && variableScope instanceof ExecutionEntity) || (TASK_KEY.equals(property) && variableScope instanceof TaskEntity) ) { context.setPropertyResolved(true); return variableScope; } else if (EXECUTION_KEY.equals(property) && variableScope instanceof TaskEntity) { context.setPropertyResolved(true); return ((TaskEntity) variableScope).getExecution(); } else if(LOGGED_IN_USER_KEY.equals(property)){ context.setPropertyResolved(true); return Authentication.getAuthenticatedUserId(); } else { if (variableScope.hasVariable(variable)) { context.setPropertyResolved(true); // if not set, the next elResolver in the CompositeElResolver will be called return variableScope.getVariable(variable); } } } // property resolution (eg. bean.value) will be done by the BeanElResolver (part of the CompositeElResolver) // It will use the bean resolved in this resolver as base. return null; }
public Object get(Object key) { if (variableScopeKey.equals(key)) { return variableScope; } return variableScope.getVariable((String) key); } }
public Set<String> keySet() { return variableScope.getVariables().keySet(); }
requestedVariables.putAll(parent.getVariableInstances(variableNamesToFetch, fetchAllVariables));
return parentScope.getVariableInstance(variableName, true); return parentScope.getVariableInstance(variableName, false);
public boolean containsKey(Object key) { return variableScopeKey.equals(key) || KEYS.contains(key)|| variableScope.hasVariable((String) key); }
public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } }
public Object put(String name, Object value) { if (storeScriptVariables) { Object oldValue = null; if (!UNSTORED_KEYS.contains(name)) { oldValue = variableScope.getVariable(name); variableScope.setVariable(name, value); return oldValue; } } return defaultBindings.put(name, value); }