01: /*
02: * Created on Aug 5, 2003
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.bpm.flow;
08:
09: import java.util.ArrayList;
10: import java.util.HashMap;
11:
12: import org.xdev.base.xssl.XSSLAction;
13: import org.xdev.base.xssl.XSSLReturn;
14:
15: /**
16: * @author AYegorov
17: *
18: * To change the template for this generated type comment go to
19: * Window>Preferences>Java>Code Generation>Code and Comments
20: */
21: public class WhileFlow extends XSSLReturn {
22: private Object returnValue = null;
23:
24: /**
25: * @param id
26: */
27: public WhileFlow(String id) {
28: super (id);
29: // TODO Auto-generated constructor stub
30: }
31:
32: /**
33: * @param id
34: * @param properties
35: */
36: public WhileFlow(String id, HashMap properties) {
37: super (id, properties);
38: // TODO Auto-generated constructor stub
39: }
40:
41: public Object getObjectValue() {
42: return this .returnValue;
43: }
44:
45: protected synchronized void set() throws Exception {
46: XSSLAction condition = (XSSLAction) this .getElement(0);
47: XSSLAction action = (XSSLAction) this .getElement(1);
48: while (condition.execute(this )) {
49: if (action.execute(this )) {
50: if (action instanceof XSSLReturn) {
51: this .returnValue = ((XSSLReturn) action)
52: .getObjectValue();
53: }
54: }
55: }
56: }
57: }
|