Loading src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java +8 −8 Original line number Diff line number Diff line Loading @@ -275,17 +275,17 @@ public class PolicyServiceImpl implements PolicyService { .getPolicyRuleBasic() .setPolicyRuleState(REMOVED_POLICYRULE_STATE); // Delete from DB first, then remove from in-memory maps. // No setPolicyRule call — that would re-persist the row we're trying to delete. contextService .setPolicyRule(policyRule) .onFailure() .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) .removePolicyRule(policyRuleId) .subscribe() .with( tmp -> LOGGER.infof( "Delete Policy with ID: " + VALID_MESSAGE, policyRuleBasic.getPolicyRuleId())); contextService.removePolicyRule(policyRuleId).subscribe().with(x -> {}); x -> LOGGER.infof( "Deleted Policy with ID %s from context", policyRuleBasic.getPolicyRuleId()), failure -> LOGGER.errorf( "Failed to delete Policy with ID %s: %s", policyRuleBasic.getPolicyRuleId(), failure.getMessage())); return new PolicyRuleState( PolicyRuleStateEnum.POLICY_REMOVED, REMOVED_POLICYRULE_STATE.getPolicyRuleStateMessage()); Loading Loading
src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java +8 −8 Original line number Diff line number Diff line Loading @@ -275,17 +275,17 @@ public class PolicyServiceImpl implements PolicyService { .getPolicyRuleBasic() .setPolicyRuleState(REMOVED_POLICYRULE_STATE); // Delete from DB first, then remove from in-memory maps. // No setPolicyRule call — that would re-persist the row we're trying to delete. contextService .setPolicyRule(policyRule) .onFailure() .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) .removePolicyRule(policyRuleId) .subscribe() .with( tmp -> LOGGER.infof( "Delete Policy with ID: " + VALID_MESSAGE, policyRuleBasic.getPolicyRuleId())); contextService.removePolicyRule(policyRuleId).subscribe().with(x -> {}); x -> LOGGER.infof( "Deleted Policy with ID %s from context", policyRuleBasic.getPolicyRuleId()), failure -> LOGGER.errorf( "Failed to delete Policy with ID %s: %s", policyRuleBasic.getPolicyRuleId(), failure.getMessage())); return new PolicyRuleState( PolicyRuleStateEnum.POLICY_REMOVED, REMOVED_POLICYRULE_STATE.getPolicyRuleStateMessage()); Loading