code: function () {
        var doUniqueSlotIdsCheck = function (elementary) {
          var duplicateSlotIds = [];
          elementary.slots.forEach(function (slot) {
            var slotId = slot.slotId;
  
            function filterBySlotId (slot) {
              return slot.slotId === slotId;
            }
  
            var arrayByUniqueSlotIds = elementary.slots.filter(filterBySlotId);
            if (arrayByUniqueSlotIds.length > 1 && duplicateSlotIds.indexOf(slotId) < 0) {
              duplicateSlotIds.push(slotId);
            }
          });
          duplicateSlotIds.forEach(function (slotId) {
            errors.push('RuleViolation identified: Artifact \'' + elementary.artifactId +
              '\' contains multiple slots with \'slotId\'=\'' + slotId + '\'');
          });
        };
        //
        if (doc.artifacts && doc.artifacts.elementaryComponents) {
          doc.artifacts.elementaryComponents.forEach(function (elementary) {
            if (elementary.slots) {
              doUniqueSlotIdsCheck(elementary);
            }
          });
        }
      }
docs: Rule 6: Check elementary slot definitions to have unique slot's.