diff --git a/src/Plugin/Condition/DataComparison.php b/src/Plugin/Condition/DataComparison.php
index b17005e3..e303abb1 100644
--- a/src/Plugin/Condition/DataComparison.php
+++ b/src/Plugin/Condition/DataComparison.php
@@ -19,6 +19,7 @@ use Drupal\rules\Core\RulesConditionBase;
  *     "operation" = @ContextDefinition("string",
  *       label = @Translation("Operator"),
  *       description = @Translation("The comparison operator. Valid values are == (default), <, >, CONTAINS (for strings or arrays) and IN (for arrays or lists)."),
+ *       assignment_restriction = "input",
  *       default_value = "=="
  *     ),
  *     "value" = @ContextDefinition("any",
diff --git a/src/Plugin/Condition/DataListContains.php b/src/Plugin/Condition/DataListContains.php
index a4ad63f7..cf8dd9af 100644
--- a/src/Plugin/Condition/DataListContains.php
+++ b/src/Plugin/Condition/DataListContains.php
@@ -15,7 +15,8 @@ use Drupal\Core\Entity\EntityInterface;
  *   context = {
  *     "list" = @ContextDefinition("list",
  *       label = @Translation("List"),
- *       description = @Translation("The list to be checked.")
+ *       description = @Translation("The list to be checked."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "item" = @ContextDefinition("any",
  *       label = @Translation("Item"),
@@ -26,7 +27,6 @@ use Drupal\Core\Entity\EntityInterface;
  *
  * @todo Add access callback information from Drupal 7?
  * @todo Add group information from Drupal 7?
- * @todo Set ContextDefinition restriction
  * @todo Add info alter
  */
 class DataListContains extends RulesConditionBase {
diff --git a/src/Plugin/Condition/DataListCountIs.php b/src/Plugin/Condition/DataListCountIs.php
index 411f00bf..8f15d172 100644
--- a/src/Plugin/Condition/DataListCountIs.php
+++ b/src/Plugin/Condition/DataListCountIs.php
@@ -18,7 +18,8 @@ use Drupal\rules\Core\RulesConditionBase;
  *     ),
  *     "operator" = @ContextDefinition("string",
  *       label = @Translation("Operator"),
- *       description = @Translation("The comparison operator.")
+ *       description = @Translation("The comparison operator."),
+ *       assignment_restriction = "input"
  *     ),
  *     "value" = @ContextDefinition("integer",
  *       label = @Translation("Count"),
@@ -30,7 +31,6 @@ use Drupal\rules\Core\RulesConditionBase;
  * @todo Add access callback information from Drupal 7?
  * @todo set ContextDefinition default value
  * @todo Set ContextDefinition options list
- * @todo Set ContextDefinition restriction
  */
 class DataListCountIs extends RulesConditionBase {
 
diff --git a/src/Plugin/Condition/EntityHasField.php b/src/Plugin/Condition/EntityHasField.php
index 4a09c7f7..8d847c75 100644
--- a/src/Plugin/Condition/EntityHasField.php
+++ b/src/Plugin/Condition/EntityHasField.php
@@ -15,11 +15,13 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity for which to evaluate the condition.")
+ *       description = @Translation("Specifies the entity for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "field" = @ContextDefinition("string",
  *       label = @Translation("Field"),
- *       description = @Translation("The name of the field to check for.")
+ *       description = @Translation("The name of the field to check for."),
+ *       assignment_restriction = "input"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/EntityIsNew.php b/src/Plugin/Condition/EntityIsNew.php
index 737f2cb2..bd220e82 100644
--- a/src/Plugin/Condition/EntityIsNew.php
+++ b/src/Plugin/Condition/EntityIsNew.php
@@ -15,7 +15,8 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity for which to evaluate the condition.")
+ *       description = @Translation("Specifies the entity for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/EntityIsOfBundle.php b/src/Plugin/Condition/EntityIsOfBundle.php
index 313fe48e..caca17df 100644
--- a/src/Plugin/Condition/EntityIsOfBundle.php
+++ b/src/Plugin/Condition/EntityIsOfBundle.php
@@ -20,11 +20,13 @@ use Drupal\rules\Core\RulesConditionBase;
  *     ),
  *     "type" = @ContextDefinition("string",
  *       label = @Translation("Type"),
- *       description = @Translation("The type of the evaluated entity.")
+ *       description = @Translation("The type of the evaluated entity."),
+ *       assignment_restriction = "input"
  *     ),
  *     "bundle" = @ContextDefinition("string",
  *       label = @Translation("Bundle"),
- *       description = @Translation("The bundle of the evaluated entity.")
+ *       description = @Translation("The bundle of the evaluated entity."),
+ *       assignment_restriction = "input"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/EntityIsOfType.php b/src/Plugin/Condition/EntityIsOfType.php
index f4719a63..40bf4064 100644
--- a/src/Plugin/Condition/EntityIsOfType.php
+++ b/src/Plugin/Condition/EntityIsOfType.php
@@ -15,11 +15,13 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity for which to evaluate the condition.")
+ *       description = @Translation("Specifies the entity for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "type" = @ContextDefinition("string",
  *       label = @Translation("Type"),
- *       description = @Translation("The entity type specified by the condition.")
+ *       description = @Translation("The entity type specified by the condition."),
+ *       assignment_restriction = "input"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/NodeIsPromoted.php b/src/Plugin/Condition/NodeIsPromoted.php
index ca1356d5..bbd24ffa 100644
--- a/src/Plugin/Condition/NodeIsPromoted.php
+++ b/src/Plugin/Condition/NodeIsPromoted.php
@@ -15,7 +15,8 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "node" = @ContextDefinition("entity:node",
  *       label = @Translation("Node"),
- *       description = @Translation("Specifies the node for which to evaluate the condition.")
+ *       description = @Translation("Specifies the node for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/NodeIsPublished.php b/src/Plugin/Condition/NodeIsPublished.php
index 4146a368..1e51d3e9 100644
--- a/src/Plugin/Condition/NodeIsPublished.php
+++ b/src/Plugin/Condition/NodeIsPublished.php
@@ -15,7 +15,8 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "node" = @ContextDefinition("entity:node",
  *       label = @Translation("Node"),
- *       description = @Translation("Specifies the node for which to evaluate the condition.")
+ *       description = @Translation("Specifies the node for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/NodeIsSticky.php b/src/Plugin/Condition/NodeIsSticky.php
index e60c8370..682d4e31 100644
--- a/src/Plugin/Condition/NodeIsSticky.php
+++ b/src/Plugin/Condition/NodeIsSticky.php
@@ -15,7 +15,8 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "node" = @ContextDefinition("entity:node",
  *       label = @Translation("Node"),
- *       description = @Translation("Specifies the node for which to evaluate the condition.")
+ *       description = @Translation("Specifies the node for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/TextComparison.php b/src/Plugin/Condition/TextComparison.php
index 1a954af6..136799d5 100644
--- a/src/Plugin/Condition/TextComparison.php
+++ b/src/Plugin/Condition/TextComparison.php
@@ -14,11 +14,13 @@ use Drupal\rules\Core\RulesConditionBase;
  *   context = {
  *     "text" = @ContextDefinition("string",
  *       label = @Translation("Text"),
- *       description = @Translation("Specifies the text data to evaluate.")
+ *       description = @Translation("Specifies the text data to evaluate."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "operator" = @ContextDefinition("string",
  *       label = @Translation("Operator"),
  *       description = @Translation("The comparison operator. One of 'contains', 'starts', 'ends', or 'regex'. Defaults to 'contains'."),
+ *       assignment_restriction = "input",
  *       default_value = "contains",
  *       required = FALSE
  *     ),
diff --git a/src/Plugin/Condition/UserHasEntityFieldAccess.php b/src/Plugin/Condition/UserHasEntityFieldAccess.php
index b185ffbf..1661ce05 100644
--- a/src/Plugin/Condition/UserHasEntityFieldAccess.php
+++ b/src/Plugin/Condition/UserHasEntityFieldAccess.php
@@ -19,19 +19,23 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity for which to evaluate the condition.")
+ *       description = @Translation("Specifies the entity for which to evaluate the condition."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "field" = @ContextDefinition("string",
  *       label = @Translation("Field"),
- *       description = @Translation("The name of the field to check for.")
+ *       description = @Translation("The name of the field to check for."),
+ *       assignment_restriction = "input"
  *     ),
  *     "operation" = @ContextDefinition("string",
  *       label = @Translation("Access operation"),
- *       description = @Translation("The access type to check.")
+ *       description = @Translation("The access type to check."),
+ *       assignment_restriction = "input"
  *     ),
  *     "user" = @ContextDefinition("entity:user",
  *       label = @Translation("User"),
- *       description = @Translation("Specifies the user account for which to check access. If left empty, the currently logged in user will be used.")
+ *       description = @Translation("Specifies the user account for which to check access. If left empty, the currently logged in user will be used."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/Condition/UserHasRole.php b/src/Plugin/Condition/UserHasRole.php
index 1724041f..290c5e26 100644
--- a/src/Plugin/Condition/UserHasRole.php
+++ b/src/Plugin/Condition/UserHasRole.php
@@ -26,6 +26,7 @@ use Drupal\user\UserInterface;
  *     "operation" = @ContextDefinition("string",
  *       label = @Translation("Match roles"),
  *       description = @Translation("If matching against all selected roles, the user must have <em>all</em> the roles selected."),
+ *       assignment_restriction = "input",
  *       default_value = "AND",
  *       required = FALSE
  *     ),
diff --git a/src/Plugin/RulesAction/DataCalculateValue.php b/src/Plugin/RulesAction/DataCalculateValue.php
index d2966ebd..1022b717 100644
--- a/src/Plugin/RulesAction/DataCalculateValue.php
+++ b/src/Plugin/RulesAction/DataCalculateValue.php
@@ -18,7 +18,8 @@ use Drupal\rules\Core\RulesActionBase;
  *     ),
  *     "operator" = @ContextDefinition("string",
  *       label = @Translation("Operator"),
- *       description = @Translation("The calculation operator.")
+ *       description = @Translation("The calculation operator."),
+ *       assignment_restriction = "input"
  *     ),
  *     "input_2" = @ContextDefinition("float",
  *       label = @Translation("Input value 2"),
diff --git a/src/Plugin/RulesAction/DataConvert.php b/src/Plugin/RulesAction/DataConvert.php
index 8df6ae2d..9cc198aa 100644
--- a/src/Plugin/RulesAction/DataConvert.php
+++ b/src/Plugin/RulesAction/DataConvert.php
@@ -13,11 +13,13 @@ use Drupal\rules\Exception\InvalidArgumentException;
  *   context = {
  *     "value" = @ContextDefinition("any",
  *       label = @Translation("Value"),
- *       description = @Translation("The first input value for the calculation.")
+ *       description = @Translation("The first input value for the calculation."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "target_type" = @ContextDefinition("string",
  *       label = @Translation("Target type"),
- *       description = @Translation("The data type to convert a value to.")
+ *       description = @Translation("The data type to convert a value to."),
+ *       assignment_restriction = "input"
  *     ),
  *     "rounding_behavior" = @ContextDefinition("string",
  *       label = @Translation("Rounding behavior"),
@@ -33,7 +35,6 @@ use Drupal\rules\Exception\InvalidArgumentException;
  *   }
  * )
  * @todo Add rounding_behaviour default value "round".
- * @todo Add various input restrictions.
  * @todo Add options_list for target type.
  * @todo Specify the right data type for the provided result.
  */
diff --git a/src/Plugin/RulesAction/DataListItemAdd.php b/src/Plugin/RulesAction/DataListItemAdd.php
index 299b7e8b..b4eed07d 100644
--- a/src/Plugin/RulesAction/DataListItemAdd.php
+++ b/src/Plugin/RulesAction/DataListItemAdd.php
@@ -14,7 +14,8 @@ use Drupal\rules\Core\RulesActionBase;
  *   context = {
  *     "list" = @ContextDefinition("list",
  *       label = @Translation("List"),
- *       description = @Translation("The data list, to which an item is to be added.")
+ *       description = @Translation("The data list, to which an item is to be added."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "item" = @ContextDefinition("any",
  *       label = @Translation("Item"),
@@ -36,7 +37,6 @@ use Drupal\rules\Core\RulesActionBase;
  * )
  *
  * @todo Add access callback information from Drupal 7?
- * @todo Set ContextDefinition restriction
  */
 class DataListItemAdd extends RulesActionBase {
 
diff --git a/src/Plugin/RulesAction/DataListItemRemove.php b/src/Plugin/RulesAction/DataListItemRemove.php
index 75da9dd2..85df7139 100644
--- a/src/Plugin/RulesAction/DataListItemRemove.php
+++ b/src/Plugin/RulesAction/DataListItemRemove.php
@@ -14,7 +14,8 @@ use Drupal\rules\Core\RulesActionBase;
  *   context = {
  *     "list" = @ContextDefinition("list",
  *       label = @Translation("List"),
- *       description = @Translation("The data list from which an item is to be removed.")
+ *       description = @Translation("The data list from which an item is to be removed."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "item" = @ContextDefinition("any",
  *       label = @Translation("Item"),
diff --git a/src/Plugin/RulesAction/DataSet.php b/src/Plugin/RulesAction/DataSet.php
index c69b955e..fbb9c077 100644
--- a/src/Plugin/RulesAction/DataSet.php
+++ b/src/Plugin/RulesAction/DataSet.php
@@ -27,7 +27,6 @@ use Drupal\rules\Core\RulesActionBase;
  *   }
  * )
  *
- * @todo Add various input restrictions: selector on 'data'.
  * @todo 'allow NULL' for both 'data' and 'value'?
  */
 class DataSet extends RulesActionBase {
diff --git a/src/Plugin/RulesAction/EntityDelete.php b/src/Plugin/RulesAction/EntityDelete.php
index bdb95743..4643fd9e 100644
--- a/src/Plugin/RulesAction/EntityDelete.php
+++ b/src/Plugin/RulesAction/EntityDelete.php
@@ -15,7 +15,8 @@ use Drupal\rules\Core\RulesActionBase;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity, which should be deleted permanently.")
+ *       description = @Translation("Specifies the entity, which should be deleted permanently."),
+ *       assignment_restriction = "selector"
  *     ),
  *   }
  * )
diff --git a/src/Plugin/RulesAction/EntitySave.php b/src/Plugin/RulesAction/EntitySave.php
index b0124cfd..8d91f205 100644
--- a/src/Plugin/RulesAction/EntitySave.php
+++ b/src/Plugin/RulesAction/EntitySave.php
@@ -15,11 +15,13 @@ use Drupal\rules\Core\RulesActionBase;
  *   context = {
  *     "entity" = @ContextDefinition("entity",
  *       label = @Translation("Entity"),
- *       description = @Translation("Specifies the entity, which should be saved permanently.")
+ *       description = @Translation("Specifies the entity, which should be saved permanently."),
+ *       assignment_restriction = "selector"
  *     ),
  *     "immediate" = @ContextDefinition("boolean",
  *       label = @Translation("Force saving immediately"),
  *       description = @Translation("Usually saving is postponed till the end of the evaluation, so that multiple saves can be fold into one. If this set, saving is forced to happen immediately."),
+ *       assignment_restriction = "input",
  *       default_value = FALSE,
  *       required = FALSE
  *     ),
diff --git a/src/Plugin/RulesAction/SystemMessage.php b/src/Plugin/RulesAction/SystemMessage.php
index 1176aaf4..b73c4e4d 100644
--- a/src/Plugin/RulesAction/SystemMessage.php
+++ b/src/Plugin/RulesAction/SystemMessage.php
@@ -28,6 +28,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  *     "repeat" = @ContextDefinition("boolean",
  *       label = @Translation("Repeat message"),
  *       description = @Translation("If disabled and the message has been already shown, then the message won't be repeated."),
+ *       assignment_restriction = "input",
  *       default_value = NULL,
  *       required = FALSE
  *     ),
