variable
variable

Reputation: 9694

What is the 'constraint or expression' vs 'constraint and expression' vs 'AND' vs 'OR'?

In the precedence constraint window there is drop down for constraint, expression, 'constraint or expression', 'constraint and expression'.

And at the bottom there is a choice to choose 'AND' or 'OR'.

I understand constraint, expression, 'constraint and expression'. What is the use case of 'constraint or expression'?

When either of 'constraint and expression' or 'constraint or expression' is selected then what is the use case of OR in the choice box?

Upvotes: 0

Views: 791

Answers (1)

Venkataraman R
Venkataraman R

Reputation: 12969

Basically, the precendence constraint evaulation operation decides, how the precedence constraint has to be evaulated.

If we choose just constraint, then expression will be disabled. If we choose just expression, value will be disabled. If either "expression or constraint" or "Expression and constraint", both value and expression will be enabled.

In the below scenario, the previous task has to succeed or Expression should be successful, for the subsequent task to execute.

Precedence constraint

Evaluation Operation:

  • If it is Constraint expression, only constraint is evaluated (Success, failure, completion)
  • If it is expression, expression is evaluated
  • If it is "Expression and Constraint" or "Expression and constraint", both are evaluated
    • AND -> Both Constraint and Expression should be true
    • OR -> Either Constraint or Expression should be true

FROM MSDN link

Evaluation operation Specify the evaluation operation that the precedence constraint uses. The operations are: Constraint, Expression, Expression and Constraint, and Expression or Constraint.

Value Specify the constraint value: Success, Failure, or Completion.

Note The precedence constraint line is green for Success, highlighted for Failure, and blue for Completion.

Expression If using the operations Expression, Expression and Constraint, or Expression or Constraint, type an expression or launch the Expression Builder to create the expression. The expression must evaluate to a Boolean.

Test Validate the expression.

Logical AND Select to specify that multiple precedence constraints on the same executable must be evaluated together. All constraints must evaluate to True.

Note This type of precedence constraint appears as a solid green, highlighted or blue line.

Logical OR Select to specify that multiple precedence constraints on the same executable must be evaluated together. At least one constraint must evaluate to True.

Note This type of precedence constraint appears as a dotted green, highlighted, or blue line

Upvotes: 2

Related Questions