If I understand you correctly, you use a WCF Service to send a task to SharePoint (you may be able to use the BizTalk SharePoint Adapter to do this directly - I have ner used it, but I think this is the kind of thing it can do). The event handler in SharePoint fires when the task is marked complete and then sends a message back to BizTalk To get the message back to BizTalk, you will need to create a WCF Receive Location. This receive location can be either one way or two way.
These are really both two way receive ports. The Port receives the message from SharePoint via WCF and then sends a repsonse back to SharePoint to ack the receipt. BizTalk considers it a one way receive port if it only sends back an ACK.It considers it a two way receive port if it sends back the ACK along with a message So in a nutshell, you need to set up this second receive port in the orchestration.
Publish it as a WCF web service. You also need to set up correlation so that the message can find its way back to the correct orchestration instance. Here is a good blog post on correlation: http://mstecharchitect.blogspot.com/2009/03/message-correlation-in-biztalk-2006.html The key to successful correlation is having a promoted property in each message that can be used to tie them back togeather.
So the task you send to SharePoint should have a unique TaskID (or whatever). And the response from SharePoint should have that same promoted property in the repsonse.
If I understand you correctly, you use a WCF Service to send a task to SharePoint (you may be able to use the BizTalk SharePoint Adapter to do this directly - I have ner used it, but I think this is the kind of thing it can do). The event handler in SharePoint fires when the task is marked complete and then sends a message back to BizTalk. To get the message back to BizTalk, you will need to create a WCF Receive Location.
This receive location can be either one way or two way. These are really both two way receive ports. The Port receives the message from SharePoint via WCF and then sends a repsonse back to SharePoint to ack the receipt.
BizTalk considers it a one way receive port if it only sends back an ACK. It considers it a two way receive port if it sends back the ACK along with a message. So in a nutshell, you need to set up this second receive port in the orchestration.
Publish it as a WCF web service. You also need to set up correlation so that the message can find its way back to the correct orchestration instance. Here is a good blog post on correlation: http://mstecharchitect.blogspot.com/2009/03/message-correlation-in-biztalk-2006.html.The key to successful correlation is having a promoted property in each message that can be used to tie them back togeather.So the task you send to SharePoint should have a unique TaskID (or whatever).
And the response from SharePoint should have that same promoted property in the repsonse.
Just to add to Chris's post (+1) - BizTalk is very flexible about how you return the success (or failure) from the workflow in Sharepoint back to the orchestration - you can use anything from writing a file in a directory using the file adapter, to emailing it to an SMTP receive port, to writing a record in a database and polling from BizTalk using the SQL adapter. To expose an orchestration (or receive ports in it) as a WCF service, the easiest way is to use the WCF Publishing Wizard (Tools | WCF Publishing Wizard in Visual Studio). This will walk you through creating the ports in BizTalk, and publishing the web service and Mex / WSDL under IIS.
From this you will be able to add a Web / Service Reference from your Sharepoint App. One gotcha is to make sure that the App under IIS is running. Note that it is also possible to get BizTalk to host the WCF directly, but this is a bit more complicated.
I have created a send port of "WCF-Custom" type and filled in an address, binding set to "customBinding" and modified the authentication modes and credentials for the port. I enabled the port and if I surf to the url is see a message "metadata publishing for this service is currently disabled". How can I fix this and how can I reach the port from my webservice?
– Rise_against Sep 10 '10 at 11:24 Nevermind, I fixed it by configuring the metadata publishing. Now how can I call this port from a project? I added a service reference to the receiveport webservice and created a new instance of it.
Now I see there is a method "BizTalkSubmit" but I need to give a Channels. Message with the method. How do I create this message?
– Rise_against Sep 10 '10 at 11:38 The Channels. Message will represent the schema of the message that BizTalk is expecting in the Receive on the orchestration - the proxy entity created on the service reference should have typed fields for every element of the schema. As per Chris' post, you will need to correlate the call back into the orchestration using some piece of identifying / continuation data.
– nonnb Sep 10 '10 at 12:11.
You could just send back "success" as you do in the other case.
The webservice just sends a string for now, what I want to do is when something invokes the webservice (not from biztalk, but from sharepoint) I want to send a message to the biztalk orchestration (example: a string with the title of a task). So I don't think I can simply consume the wcf service in biztalk, because the service doesn't expect an input, it just sends messages to biztalk) – Rise_against Sep 9 '10 at 13:15 @RiseAgainst - yes, you are right, you will need to publish (expose) a WCF service from BizTalk. The easiest way to do this is from the WCF Publication Wizard (but this also requires IIS) – nonnb Sep 10 '10 at 12:13.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.