Jan 4, 2010

SharePoint Workflow: onTaskChanged inside While Activity

It is a common use to put onTaskChanged activity inside a While loop in a ShaerPoint Workflow, but unlike normal scenario where you can directly access its AfterProperties or BeforeProperties, both of them are null when onTaskChanged activity in a while loop. To get around this problem, OnTaskChanged activity needs to have both AfterProperties and BeforeProperties bind to either a field or property. This is not necessary though if onTaskChanged is not inside a While activity. I found this with Visual Studio 2010 beta 2, and I will verify it with new realease of VS 2010.