O'Reilly logo

Building Applications with Windows Workflow Foundation: State Machine and Rules-Driven Workflows by Michael Stiefel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rules-Driven Workflow

The third workflow pattern that ships with Workflow Foundation is modeled by the PolicyActivity class. The policy activity uses the WF rules engine to incorporate rule based decision making into your workflows. A state or sequential workflow is based on a sequence of operations that evolve over time. Rules allow you to model relationships that are independent of time. You can also view these rules as constraints on the data consumed by your workflow.

The FinancialRecommendations example uses the PolicyActivity to execute a simple set of rules that allocates financial assets based on age, portfolio size, and expressed risk preference (see Figure 22).

Figure 22 Output from Financial Recommendations Application

Figure 23 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required