Source:
<code>public void ruleSnomedCommon3() throws Exception { final String ruleId = "snomed-common-3"; indexRule(ruleId); <START> SnomedRelationshipIndexEntry relationshipWithDefiningCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) <END> .characteristicTypeId(Concepts.DEFINING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithDefiningCharType); SnomedRelationshipIndexEntry relationshipWithQualifingCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.QUALIFYING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithQualifingCharType); SnomedRelationshipIndexEntry relationshipWithStatedCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.STATED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithStatedCharType); SnomedRelationshipIndexEntry relationshipWithInferredCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.INFERRED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithInferredCharType); SnomedRelationshipIndexEntry relationshipWithAdditionalCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ADDITIONAL_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithAdditionalCharType); ValidationIssues issues = validate(ruleId); assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithDefiningCharType.getId()), ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithQualifingCharType.getId()) ); }</code><technical_language>Add another relationship a type of characteristic type hierarchy. rule report error</technical_language>

Target:
public void ruleSnomedCommon3() throws Exception { final String ruleId = "snomed-common-3"; indexRule(ruleId); SnomedRelationshipIndexEntry relationshipWithDefiningCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.DEFINING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithDefiningCharType); SnomedRelationshipIndexEntry relationshipWithQualifingCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.QUALIFYING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithQualifingCharType); SnomedRelationshipIndexEntry relationshipWithStatedCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.STATED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithStatedCharType); SnomedRelationshipIndexEntry relationshipWithInferredCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.INFERRED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithInferredCharType); SnomedRelationshipIndexEntry relationshipWithAdditionalCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ADDITIONAL_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithAdditionalCharType); SnomedRelationshipIndexEntry relationshipWithCharTypeOutsideOfCharTypeHierarchy = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ROOT_CONCEPT) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithCharTypeOutsideOfCharTypeHierarchy); ValidationIssues issues = validate(ruleId); assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithDefiningCharType.getId()), ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithQualifingCharType.getId()) ); }