Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.kuali.rice.kew.engine.node.var.schemes;
A property scheme that looks the property up in the state variable map

Kuali Rice Team (
public final class VariableScheme implements PropertyScheme {
    private static final Logger LOG = Logger.getLogger(VariableScheme.class);
    public String getName() {
        return "variable";
    public String getShortName() {
        return "var";
    public Object load(Property propertyRouteContext context) {
//        try {
//            return PropertyUtils.getProperty(doc.getVariables(), property.locator);
            .debug("getting variable: " + property.locator);
            BranchService branchService = KEWServiceLocator.getBranchService();
            String value = branchService.getScopedVariableValue(context.getNodeInstance().getBranch(), . + property.locator);
            .debug("variable '" + property.locator + "': " + value);
            return value;
//        } catch (NoSuchMethodException nsme) {
//            throw new RuntimeException("Error loading resource: " + property.locator, nsme);
//        } catch (InvocationTargetException ite) {
//            throw new RuntimeException("Error loading resource: " + property.locator, ite);
//        } catch (IllegalAccessException iae) {
//            throw new RuntimeException("Error loading resource: " + property.locator, iae);
//        }
    public String toString() {
        return "[VariableScheme]";
New to GrepCode? Check out our FAQ X