- if (isCorrelated($a, $b)){
- // If any of the alarms have been marked as root, a policy message has ever been created and sent. Do NOT send it again.
- if ($a.getRootFlag() != 1 && $b.getRootFlag() != 1) {
- PolicyMsg msg = createPolicyMsg($a);
- DmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);
- dmaapService.publishPolicyMsg(msg, "unauthenticated.DCAE_CL_OUTPUT");
- }
- $a.setRootFlag(1);
- $b.setRootFlag(1);
- update($a);
- update($b);
+ if ("down".equalsIgnoreCase(getAdditionalField($a, "oper-status"))
+ && "down".equalsIgnoreCase(getAdditionalField($b, "oper-status"))) {
+ if (isCorrelated($a, $b)){
+ // If any of the alarms have been marked as root, a policy message has ever been created and sent. Do NOT send it again.
+ if ($a.getRootFlag() != 1 && $b.getRootFlag() != 1) {
+ PolicyMsg msg = createPolicyMsg($a);
+ DmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);
+ dmaapService.publishPolicyMsg(msg, "unauthenticated.DCAE_CL_OUTPUT");
+ }
+ $a.setRootFlag(1);
+ $b.setRootFlag(1);
+ update($a);
+ update($b);
+ }