1 package org.jbpm.context.log; 2 3 import org.jbpm.context.exe.*; 4 5 public abstract class VariableUpdateLog extends VariableLog { 6 7 public VariableUpdateLog() { 8 } 9 10 public VariableUpdateLog(VariableInstance variableInstance) { 11 super(variableInstance); 12 } 13 14 public abstract Object getOldValue(); 15 public abstract Object getNewValue(); 16 17 public String toString() { 18 return "varupdate["+variableInstance+"="+getNewValue()+"]"; 19 } 20 21 public void undo() { 22 variableInstance.setValue( getOldValue() ); 23 } 24 } 25 | Popular Tags |