for (OperationModel operationModel : operationsModel.getOperations()) {
String name = Strings.trimToNull(operationModel.getName());
if (name == null) {
name = DEFAULT;
}
OperationType type = operationModel.getType();
if (type == null) {
type = defaultOperation.getType();
}
String eventId = operationModel.getEventId();
if (eventId == null) {
eventId = defaultOperation.getEventId();
}
KnowledgeOperation operation = new KnowledgeOperation(type, eventId);
mapExpressions(operationModel, operation);
if (operations.containsKey(name)) {
throw CommonKnowledgeMessages.MESSAGES.cannotRegisterOperation(type.toString(), name);
}
operations.put(name, operation);
}
}
if (!operations.containsKey(DEFAULT)) {