diff --git ui/transformations_ui.dragndrop.js ui/transformations_ui.dragndrop.js
index 9cfe9c1..0aba933 100644
--- ui/transformations_ui.dragndrop.js
+++ ui/transformations_ui.dragndrop.js
@@ -84,22 +84,42 @@ Drupal.behaviors.transformationsUiDragAndDrop = function(context) {
 
   // Initialize the droppables.
   $('.transformations-operation-output .transformations-drop-target', context).droppable({
-    accept: '.transformations-operation-input',
+    accept: function(draggable) {
+      if (draggable == undefined) {
+        return false;
+      }
+      if (!draggable.hasClass('transformations-operation-input')) {
+        return false;
+      }
+      return Drupal.transformationsUiIsDroppable(
+        $(this).parent().attr('id'), draggable.attr('id')
+      );
+    },
     hoverClass: 'transformations-operation-slot-hover',
     tolerance: 'pointer',
     drop: function(event, ui) {
       Drupal.transformationsUiConnectSlots(
-        $(this).parent().attr('id'), $(ui.draggable).attr('id')
+        $(this).parent().attr('id'), ui.draggable.attr('id')
       );
     },
   });
   $('.transformations-operation-input .transformations-drop-target', context).droppable({
-    accept: '.transformations-operation-output',
+    accept: function(draggable) {
+      if (draggable == undefined) {
+        return false;
+      }
+      if (!draggable.hasClass('transformations-operation-output')) {
+        return false;
+      }
+      return Drupal.transformationsUiIsDroppable(
+        draggable.attr('id'), $(this).parent().attr('id')
+      );
+    },
     hoverClass: 'transformations-operation-slot-hover',
     tolerance: 'pointer',
     drop: function(event, ui) {
       Drupal.transformationsUiConnectSlots(
-        $(ui.draggable).attr('id'), $(this).parent().attr('id')
+        ui.draggable.attr('id'), $(this).parent().attr('id')
       );
     },
   });
@@ -127,6 +147,25 @@ Drupal.transformationsUiConnectSlots = function(outputSlotId, inputSlotId) {
 }
 
 /**
+ * Check if a given slots may be connected.
+ */
+Drupal.transformationsUiIsDroppable = function(outputSlotId, inputSlotId) {
+  var source = Drupal.settings.transformationsUiSlots[outputSlotId];
+  var target = Drupal.settings.transformationsUiSlots[inputSlotId];
+
+  if (source == undefined || target == undefined) {
+    return false;
+  }
+  if (source.entity == target.entity) {
+    return false; // Don't allow connecting two slots from the same entity.
+  }
+  if (source.entity == '2'/* pipeline parameters */ && target.entity == '4'/* pipeline outputs */) {
+    return false; // Don't allow connecting pipeline parameters with pipeline outputs.
+  }
+  return true;
+}
+
+/**
  * Look for the bottom-most operation block and set the canvas's
  * minimum height appropriately.
  */
