We were recently reviewing the content for a new InfoPath workflow course (Mission: Automation) here at SharePoint Solutions when it was brought to my attention that the Workflow Designer in SharePoint Designer appears to have redefined the order of operations for Boolean expressions.
If you take a look at the conditions in the Workflow Designer for a simple case where we're creating a condition on the title field, you'll notice we have the Boolean expression:
title field contains "meeting" OR title field contains "lunch" AND title field contains "manager"
I learned the order of operations as BNAO (brackets, not, and, or). Since there are no brackets or parenthesis in the user interface, I can only assume that the correct way to interpret this condition expression is:
(title field contains "lunch" AND title field contains "manager") OR (title field contains "meeting")
However, when you do the testing within SharePoint, you find the order of operations interpreted within Workflow Designer as:
(title field contains "meeting" OR title field contains "lunch") AND (title field contains "manager")
as indicated by the results in the following screen shot. The "completed" workflows represent the cases where the Boolean expression evaluated as false and the "in progress" workflows represent the cases where the Boolean expression evaluated as true.
Somebody help me here! Has Microsoft redefined how Boolean expressions are evaluated or am I missing something about the way the expression is displayed that should cause me to adjust my perspective?
4 comments:
I noted a similar discrepancy in the List View filters. Microsoft simply orders the operations from left to right, independent of And/Or considerations.
Not sure what the answer would be for SharePoint Designer workflows besides custom editing the workflows afterwards. For list views, however, you can edit the CAML to better suit your needs.
I posted this on my not-too-maintained-any-longer blog a few months ago at http://wssdev.blogspot.com/2007/07/customizing-filter-query-in-list-view.html.
Ultimately, I agree - Microsoft did not give users enough control over order of operations when it comes to boolean operations.
Would definitely like to see improvements in SharePoint workflows
Help,
I had problems with our Corporate Blog site. (I had changed the View in the categories to not display the body then it was not displaying the posts in the categories.) So I created a new site and copied the posts, comments, and categories to the new site. I checked and all looked good so I deleted the old site. Now the comments are there but they are not threaded under the correct posting. Is there something I can do instead of creating the posts again which would change the posted by information?
Thanks,
Vonnie
I agree, workflow designer has some serious issues with the conditions section. Would really like to see some improvements on this in the future.
Post a Comment