我是BizTalk开发的新手,只使用了6-7周,所以请原谅我的天真。
我在开发中有一个基本的BizTalk 2013应用程序,并准备部署到测试环境中。
我使用业务规则来定义出站传输位置,在完成所有转换之后,这会将数据发送到Server中的存储过程,该存储过程插入/更新记录:
mssql://.//db1?
当我们部署到测试/活动环境时,我们将无法将出站传输位置设置为本地机器,因为数据库将存储在应用程序的单独服务器上。例如:
mssql://dbserver//db1?
我查看了BizTalk部署框架,看看是否可以根据环境修改业务规则,但找不到任何东西。
因此,我的问题是,管理基于环境的业务规则设置的最佳(最低维护)方法是什么?最好使用BizTalk部署框架。
发布于 2014-07-29 08:15:45
我将发布我使用的解决方案,以供将来参考,并帮助任何将来遇到这种情况的人。
在BizTalk部署框架中,可以向构建中添加额外的XML文件,并根据环境对绑定文件进行预处理。
下面是deployment.btdfproj文件的一些片段。不要忘记,使用BizTalk部署框架,订单是必不可少的:
<!-- Add the policy file as an additional item to the build -->
<ItemGroup>
<AdditionalFiles Include="my_policy_file.xml">
<LocationPath>..\$(ProjectName)\location_to_policy</LocationPath>
</AdditionalFiles>
</ItemGroup>
<!-- Processes the additional XML policy files added to the MSI main build folder. -->
<ItemGroup>
<FilesToXmlPreprocess Include="my_policy_file.xml">
<LocationPath>..\</LocationPath>
</FilesToXmlPreprocess>
</ItemGroup>
<!-- You still have to add the business rule to the build. It is overwritten later. -->
<ItemGroup>
<RulePolicies Include="my_policy_file.xml">
<LocationPath>..\$(ProjectName)\location_to_property</LocationPath>
</RulePolicies>
</ItemGroup>
<!-- Towards the end of the file the pre-processed file overwrites the originally included policy file. -->
<Target Name="CopyXMLPreprocessedPoliciesToBRE" AfterTargets="PreprocessFiles">
<copy sourceFiles="..\my_policy_file.xml" DestinationFolder="..\BRE\Policies"/>
</Target>
有关更多信息,请查看BizTalk部署框架站点上的以下线程:https://biztalkdeployment.codeplex.com/discussions/392801
https://stackoverflow.com/questions/24487942
复制相似问题