01 /*
02 * Created on Aug 29, 2007
03 *
04 */
05 package com.x8ing.mc.bp.develop;
06
07 import com.x8ing.lsm4j.Condition;
08 import com.x8ing.lsm4j.StateContext;
09 import com.x8ing.mc.bp.BusinessContext;
10
11 /**
12 *
13 * @author Patrick Heusser
14 */
15 public class DeployAndReleaseCondition implements Condition {
16
17 private boolean inverse = false;
18
19 public DeployAndReleaseCondition(boolean inverse) {
20 this.inverse = inverse;
21 }
22
23 /**
24 * @see com.x8ing.lsm4j.Condition#traceInfo()
25 */
26 public String traceInfo() {
27
28 return "";
29 }
30
31 /**
32 * @see com.x8ing.lsm4j.Condition#conditionTrue(com.x8ing.lsm4j.StateContext)
33 */
34 public boolean conditionTrue(StateContext currentContext) {
35
36 boolean ret = ((BusinessContext) currentContext).isDeployedWithSucess();
37
38 return inverse ? !ret : ret;
39
40 }
41
42 }
|