Equals
Removes the top two items from the stack, compares the two items, and then pushes the result onto the stack.
<ic:Operation Name="Equals" />
Top two items on the stack.
String result of the comparison operation.
The following example filter expression uses the Equals operation to compare the current activity name to the constant "CheckPO". If the two are equal, the expression evaluates to true
.
<ic:Filter>
<ic:Expression>
<wf:Operation Name="GetActivityName"/>
<ic:Operation Name="Constant">
<ic:Argument>CheckPO</ic:Argument>
</ic:Operation>
<ic:Operation Name="Equals"/>
</ic:Expression>
</ic:Filter>
You may be tempted to build your expression exactly as you would write a statement in C# when performing comparisons. For example, you might want to compare three values; in C# you would write something like:
bool res = a == b == c;
However, as a model for your expression filter this falls a little short. Instead, consider the modified (but equivalent) statement:
Bool res = (a == b) && (a == c);
This more closely matches the filter expression you would use to perform the comparison. For more details and an example, see And.