Welcome to Windows Workflow Foundation (WF)
Top Tasks :

WF Community Bloggers

Runtime Services in App.Config in WF

In Windows Workflow Foundation, you have two different ways of adding runtime services to the Workflow Engine: Through code, by using the AddService() method of the WorkflowRuntime class Through the application configuration file, by adding an entry to the <services/> tag. The latter is possible not only for the default services built into WF, like the SqlWorkflowPersistenceService , but also for your own ones; you just have to make sure you specify the correct type. You might have noticed that some of the service take extra parameters on the configuration file. For example, for the SqlWorkflowPersistenceService entry you can configure parameters like the ConnectionString, IsTransactional and so on. What may not be so obvious is that you can do the same thing for your own services and it's very easy! All you have to do is provide a constructor to your service class that takes a NameValueCollection as an argument; this collection will then have any named parameters that were included in the configuration entry. So, to keep in mind: Add your service to the configuration entry; each parameter is added as an attribute in the corresponding <add/> tag. For example: <add type="..." ConnectionString="...."/> Add alternate constructor to your service class with a NameValueCollection argument Extract named parameters from the NameValueCollection as needed to initialize your runtime service. Windows Workflow Foundation , WF Read More...
Published Thursday, October 12, 2006 10:34 AM by Commonality - Workflow
Filed under:
Anonymous comments are disabled

<October 2006>
SuMoTuWeThFrSa
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us