This question comes up quite often that it deserves its own post. Is there a way to configure one send port to send a message to a variable destination based on a parameter? For instance when using WSS adapter, can you send a message to a different document library based on the message that's being processed?
The answer is yes, it's possible to do this in two ways:
I included below more information on how to do this using dynamic send ports which is the more simple & frequent approach.
The URL for a WSS adapter dynamic send port will be something like this: 'wss://ServerName/sites/MySite/MyDocumentLibrary/' if you installed the web service on an HTTP site 'wsss://ServerName/sites/MySite/MyDocumentLibrary/' if you installed the web service on an HTTPS site (notice the additional s in wsss://). and you can set it programatically from the orchestration (like below) every time you sent out a message dynamicSendPortName(Microsoft.XLANGs.BaseTypes.Address) = "wss://ServerName/sites/MySite/" + lookedupDocLibName; The rest of the send port configuration information must be set on the outgoing message using the Config* context properties documented here http://msdn2.microsoft.com/en-us/library/aa547920.aspx
For instance: outgoingMsg(WSS.Filename) = "file1.xml"; outgoingMsg(WSS.ConfigOverwrite) = "yes"; etc. Video 04-WSSAdapter-PropsInOrchestration.wmv shared here includes one such dynamic send port examplehttp://blogs.msdn.com/ahamza/archive/2006/04/18/WssAdapterVideosWebcasts.aspx