Friday, April 20, 2012 1:42 AM
We have recently started working on workflow services using WF4. Our requirement has it that we would have to create many such workflows. And adding service reference to each service at client project is not looking good to us. Is there any way we call these services without adding service references. As I the service contract is not exposed outside I am not sure if it is possible. Any suggestions ??
Sunday, April 22, 2012 1:38 AMModerator
Yes you can always use a channel factory approach as described here: http://msdn.microsoft.com/en-us/library/ms734681.aspx.
This avoids needing to have a service reference for every workflow.
If this answers your question, please use the "Answer" button to say so | Ben Cline
Wednesday, April 25, 2012 10:51 AM
Thanks Ben for the response.
In WF4 when we create a workflow as WCF service we dont create service interface (We just add the interface name in the receive activity), hence no way we can get service contract type to use via channel factory approach.
Looks like we would have to create service contracts exactly as used in workflows, to use with channelfactory at client project where we consume the workflow service. This seems to be working when I tried on one of the sample workflows, but not sure if I can take this approach as a standard.