WF Dynamic Update - Beyond the basics  
Author Message
KarimRadi





PostPosted: Windows Workflow Foundation, WF Dynamic Update - Beyond the basics Top

By definition WF is made-up of Control Flow and Data Flow (i.e., WF State). It seams that WF have very good built-in support for Control Flow Adaptation (i.e., Adding/Removing Activities). But what about Data Flow Adaptation, i.e., adding (or even removing) Wokflow variables and Workflow Events In other words how to dynamically add Variables and Events Handlers to a WF Any detailed example(s) is also appreciated

Updating the WF control generally has an impact of the WF data/state. For example take a WF that has one activity (e.g., decimal GetAccountBalance(int AcctID) ) the latter return the balance in US$, if the customer is accessing this WF from Sydney then the system should dynamically add an activity to call GetExchangeRate(FromUS$, ToAU$) then the ExchangeRate, and the BalanceInAU$ should be added as new variables to the WF. Please note that all these changes need to be done dynamically and the base Workflow is not aware at all that it will be used in an International context. Any ideas/directions on how to achieve such a scenario is appreciated

Thanks

Karim



Software Development for Windows Vista5  
 
 
Tom Lake





PostPosted: Windows Workflow Foundation, WF Dynamic Update - Beyond the basics Top

No, you can't dynamically add variables but you can add event handlers. Take a look at this help topic for more information. If you used activity binding you would not need to add a variable.

 
 
KarimRadi





PostPosted: Windows Workflow Foundation, WF Dynamic Update - Beyond the basics Top

Thanks Tom,

Could you please suggest any workarounds/possible extensions to allow dynamically addition variables to a Workflow


 
 
Tom Lake





PostPosted: Windows Workflow Foundation, WF Dynamic Update - Beyond the basics Top

As I suggested before try using ActivityBind, for more information go here. It gives you the ability to connect directly to the activity property without the need for a variable.