AK0969

hello freinds,
In order to have communication between host and workflow, we need to have a service file(nothing but the implementation class of externaldataexchange interface).
I have done that in different ways:

1) writing in the workflow project
2)writing in the UI project(i,e. windows application project) or UI itself implementing the externaldataexcahnge interface.
3) writing it in a seperate library project

the above situations suit s for different requirements.
but,Can Any One Tell Me,Whats The Best Place To Write A Service in WorkFlow Foundation.




Re: Windows Workflow Foundation Best place to write service file

Steve Danielson

My recommendation is not to put it in with the workflow. If the workflow ever gets versioned and there is a scenario where multiple versions of the workflow are running, you will run into problems. The best place is to put it into a separate library project. You can implement the interface in your host project if you like, but the interface should be separate from the workflow. If your app is completely standalone (host and workflow in the same project with no possibility of running multiple versions of the WF at the same time) then you can put the interface in with that project.

Steve Danielson [Microsoft]
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm




Re: Windows Workflow Foundation Best place to write service file

Aravind Kathiroju

Hi Steve,thanx for the reply.
" host and workflow in the same project with no possibility of running multiple versions of the WF at the same time "
1) is this possible...i mean, i tried to place a workflow library in windows app project,i couldnt find a workflow template in that.(Actually i tried this by looking at the examples in MSDN,but i dint get them working)

"You can implement the interface in your host project if you like, but the interface should be separate from the workflow"
To get this i have to place service file in seperate project right. if my host implemets the service i need a reference to it.At the same time if i want to make some updations in UI, my service project needs a reference of host project right.
here comes a circular reference problem...how to solve this or whats the best solution to achieve the requirement






Re: Windows Workflow Foundation Best place to write service file

Steve Danielson

You can put the interface in its own project, and implement the interface in your windows form. Then you just need one reference, from the form host to the interface project. If the workflow library is in another project, you just need a reference from the form host to the workflow, and one from the workflow to the interface projecr for binding the communication activities. The service interface project will have no references to anything so there should not be a circular reference.

Steve Danielson [Microsoft]
This posting is provided "AS IS" with no warranties, and confers no rights.