Workflow Constraints – Logical OR

To do some of the stuff we wanted in SQL Server 2000 DTS we had put together some serious glue code and to be honest it wasn't pretty. One of the things that we used to have to do this way was if we wanted to implement using workflow constraints a Logical OR. Well that has changed and it is now really simple and this article is going to show you how to implement it.

In SQL Server 2000 if we had this in a package

Start

Then with no playing both of these conditions would have had to evaluate to true so the left hand side would have needed to succeed and the right hand side had to fail

This is what would have happend had both tasks succeeded

WouldHaveBeen

Our requirement is that should the task on the left succeed or the task on the right fail then the task at the bottom is still executed. Here is how we make that happen. Right click on any of the two workflow constraints and choose Edit Change the radio button from the Logical AND to the Logical OR.

Change

Changing it on one changes it on them all. Now look what happens if we execute the package

HowNow

A lot of work has been put into making constraints more powerful and it really seems to be working