1 17 18 19 20 package org.apache.lenya.workflow.impl; 21 22 import org.apache.lenya.workflow.BooleanVariableAssignment; 23 import org.apache.lenya.workflow.WorkflowException; 24 import org.apache.lenya.workflow.WorkflowInstance; 25 26 27 30 public class BooleanVariableAssignmentImpl implements BooleanVariableAssignment { 31 32 37 protected BooleanVariableAssignmentImpl(BooleanVariableImpl variable, boolean value) { 38 this.variable = variable; 39 40 this.value = value; 41 } 42 43 private BooleanVariableImpl variable; 44 private boolean value; 45 46 49 public void execute(WorkflowInstance instance) throws WorkflowException { 50 WorkflowInstanceImpl impl = (WorkflowInstanceImpl) instance; 51 impl.getVariableInstance(getVariable()).setValue(getValue()); 52 } 53 54 58 public boolean getValue() { 59 return value; 60 } 61 62 66 public BooleanVariableImpl getVariable() { 67 return variable; 68 } 69 } 70 | Popular Tags |