protected ErrorEventDefinition findErrorDefinitionForCode(String errorCode) { Collection<ErrorEventDefinition> definitions = modelInstance.getModelElementsByType(ErrorEventDefinition.class); for(ErrorEventDefinition definition: definitions) { Error error = definition.getError(); if(error != null && error.getErrorCode().equals(errorCode)) { return definition; } } return null; }
protected ErrorEventDefinition findErrorDefinitionForCode(String errorCode) { Collection<ErrorEventDefinition> definitions = modelInstance.getModelElementsByType(ErrorEventDefinition.class); for(ErrorEventDefinition definition: definitions) { Error error = definition.getError(); if(error != null && error.getErrorCode().equals(errorCode)) { return definition; } } return null; }
protected ErrorEventDefinition findErrorDefinitionForCode(String errorCode) { Collection<ErrorEventDefinition> definitions = modelInstance.getModelElementsByType(ErrorEventDefinition.class); for(ErrorEventDefinition definition: definitions) { Error error = definition.getError(); if(error != null && error.getErrorCode().equals(errorCode)) { return definition; } } return null; }