diff options
Diffstat (limited to 'feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java')
-rw-r--r-- | feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java index d27172b2..d9205977 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFeature.java @@ -38,7 +38,7 @@ public class LifecycleFeature @Override public int getSequenceNumber() { - return 10; + return 1; } @Override @@ -52,6 +52,11 @@ public class LifecycleFeature } @Override + public boolean afterPatch(PolicyController controller, boolean success) { + return fsmPatch(controller); + } + + @Override public boolean beforeStop(PolicyEngine engine) { return fsmStop(); } @@ -63,8 +68,7 @@ public class LifecycleFeature @Override public boolean beforeShutdown(PolicyEngine engine) { - fsm.shutdown(); - return false; + return fsmShutdown(engine); } @Override @@ -101,4 +105,14 @@ public class LifecycleFeature fsm.stop(controller); return false; } + + private boolean fsmPatch(PolicyController controller) { + fsm.patch(controller); + return false; + } + + private boolean fsmShutdown(PolicyEngine engine) { + fsm.shutdown(); + return false; + } } |