if (!ruleServiceDescription.isEditable()) {
try {
ruleServiceAdminStub.editRuleService(ruleServiceDescription.getExtension(),
serviceName, result);
} catch (Exception e) {
throw new RuleServiceClientException("Error editing rule service : " + serviceName,
log);
}
} else {
try {
ruleServiceAdminStub.addRuleService(ruleServiceDescription.getExtension(),
serviceName, result);
} catch (Exception e) {
throw new RuleServiceClientException("Error adding a new rule service : " +
serviceName, log);
}
}
}