1 package org.jbpm.bpel.data.exe; 2 3 import org.w3c.dom.Node ; 4 5 import org.jbpm.bpel.xml.util.NodeUtil; 6 7 11 public class SimpleVariableInstance extends VariableInstance { 12 13 private Object value; 14 15 public Object getValue() { 16 if (value == null) { 17 throw new RuntimeException ("Uninitialized variable: variable=" + getDefinition().getName()); 18 } 19 return value; 20 } 21 22 public void setValue(Object value) { 23 if (value instanceof Node ) { 24 value = NodeUtil.getValue((Node ) value); 25 } 26 this.value = value; 28 } 29 30 public Object getOrCreateValue() { 31 return getValue(); 32 } 33 } 34 | Popular Tags |