We have been using InRule for our Rule needs we have found that it does not scale well and so are investigating the Windows Work Flow. Within InRule we could configure pretty much have any task for example our sql scripts and stored procedures where all part of a separate rule config file, I am wondering if there is a similar functionality within windows work flow where I could just call a declarative task and pass it a bunch of parameters – This task should contain the sql script I would be executing , we should be able to change the script at runtime without recompilation to the WF code. Is this possible in Windows Work flow – How can I accomplish this within work flow. Additionally for sql execution within Work Flow, how does it get the connection string. Should it be passed from the calling program – is passing it as input parameter from the Calling app via the Dictionary object the best way or can the work flow code have visibility to my calling program app.config and get the connection string ?
A:
Yes this is possible in a number of ways. You can either run .net code attached to an action in the workflow, or you can save and load rules from a sql database.
I would use the web.config file for setting connection information, but only if you configure the workflow to run inside a web service host or similar.
I would consider using one or more code actions that call stored procedures on the sql database. You can then customise these procedures at any time without recompilation. You can even enable the CLR if you need to.
If you are looking for a rules engine, then this post should help.
http://richardsbraindump.blogspot.com/2007/08/how-to-use-windows-workflow-rules.html
James Westgate
2010-04-06 21:36:52
Thanks for the reply james, if you are suggesting that I can have the sql script that are part of my workflow in.net code not clear how I can make modification to the sql script without recompilation, also not clear as to how I can have the sql script (say a select or insert stat) as part of the rules which I need to dynamically load and execute at runtime or modify it after having deployed into production.
Satish
2010-04-06 21:54:38
Its been a while since I've done this, but I've found the link and pasted it backed into my answer.
James Westgate
2010-04-06 21:58:33