Party Setup: Deleting SendPort Reference during Undeploy

Topics: Bindings File, Settings Management and SSO, Getting Started/Beginner
Oct 7, 2011 at 6:17 PM

Hello,


I have a  Party Setup which requires that I have a way agreement reference a particular Send port, for example an AS2 port. Naturally when I try to undeploy, I get the following error.
"Error: Unable to process delete change request for BizTalk binding "". Import bindings (unbind) failed.  Error: Failed to update binding information.  Error: Column 'nvcName' does not belong to table bts_party_sendport."


 I guess I would have to create a custom executable similar to DeleteParty.cs in the SDK.
What I am wondering is if there is an automated way of just removing the reference to the Send Port rather than deleting the whole party? Alternatively, should I look at adding a options in the InstallWizard.xml and UnInstallWizard.xml to allow for adding/removing Parties?

 

Dylan

Coordinator
Oct 7, 2011 at 7:15 PM

Hi Dylan,

Since I'm not very familiar with the party features in BizTalk, I'll first point you to another discussion here.  Have you seen that already, and does it help at all with your question?  It's possible to manipulate many things through WMI or the BizTalk Operations API (32-bit only), so I'd suspect that you could do the port change that you mentioned.

The InstallWizard/UnInstallWizard are effectively a UI over creating environment variables, so you could create an environment variable (which becomes an MSBuild property automatically) that could indicate the need to do some special processing within your deployment script.  That's assuming there is a need for the behavior to vary.  You can always use the overridable Target's (like CustomDeployTarget) in your .btdfproj to add custom processing steps.

Thanks,
Tom

Oct 7, 2011 at 7:52 PM

Hi Tom

Thanks for your suggestions.

I did look at the discussion you mentioned and I was able to create a DeleteParty.exe based on the SDK. I am still new to the Deployment Framework and msbuild so I am was not able to understand where the DeleteParty.exe gets executed in the btdfproj and what the syntax would look like.

Dylan

Coordinator
Oct 7, 2011 at 8:26 PM
Edited Oct 7, 2011 at 8:31 PM

Add this to your .btdfproj:

<ItemGroup>
  <AdditionalFiles Include="DeleteParty.exe">
    <LocationPath>.\</LocationPath>
  </AdditionalFiles>
</ItemGroup>
<Target Name="CustomDeployTarget">
  <Exec Command="DeleteParty.exe param1 param2" ContinueOnError="False" />
</Target>

Put the ItemGroup next to your Schemas and other ItemGroup's.  The Target should go at the end.  I assumed that DeleteParty.exe is sitting in your Deployment project folder.  AdditionalFiles causes the EXE to be packaged into the installer MSI when you're building an MSI for server deployments.  You'll probably need something similar for undeploy, which is another Target element named CustomUnDeployTarget.

Let me know if that works or if you have any trouble.

Thanks,
Tom

Oct 14, 2011 at 7:22 PM

Hello Tom,

Sorry it took so long to get back to you.

Deploy and Undeploy are working very well now.

I call the DeleteParty.exe with 2 parameters, the connection string and the parties to be deleted. I pull both of these in from the SettingsFileGenerator.xml

Thanks for your help!

 

Dylan

Coordinator
Oct 17, 2011 at 3:48 AM

You're welcome, glad to hear that you got it all working!

Thanks,
Tom