ConditionedActivityGroup is a kind do of loop
, but it should not be used instead of the WhileActivity.
There are a few reasons for this:
1.Use the simplest tool that satisfy your requirement
2.workflow designer doesn't expand body of ConditionedActivityGroup, and you need to click it to Preview
3. If you have many activities in the workflow, the designer becomes terribly slow(VS 2008)
The huge workflows should be considered for refactoring by converting parts of workflow into custom composite activity or as separate worklow (with InvokeWorkflow activity)
I have a question, should I use Code Conditions vs Rule Conditions?
- Rule conditions are included in the declarative model and can be dynamically updated at run-time
- The .rules file provides code separation and enables external analysis /tools to be built on top of the .rules file.
Also to set the conditions declaravely via Rules simpler for new Activity.
However if you are using code-behind for the workflow, specify code conditions is more consistent and easy to maintain/investigate.
Editing declarative conditions in Workflow Designer is too slow.
Also VS "find references" could NOT see the references from rule conditions, which make development harder.