首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >BizTalk部署和业务规则

BizTalk部署和业务规则
EN

Stack Overflow用户
提问于 2014-06-30 10:22:16
回答 1查看 950关注 0票数 3

我是BizTalk开发的新手,只使用了6-7周,所以请原谅我的天真。

我在开发中有一个基本的BizTalk 2013应用程序,并准备部署到测试环境中。

我使用业务规则来定义出站传输位置,在完成所有转换之后,这会将数据发送到Server中的存储过程,该存储过程插入/更新记录:

代码语言:javascript
运行
复制
mssql://.//db1?

当我们部署到测试/活动环境时,我们将无法将出站传输位置设置为本地机器,因为数据库将存储在应用程序的单独服务器上。例如:

代码语言:javascript
运行
复制
mssql://dbserver//db1?

我查看了BizTalk部署框架,看看是否可以根据环境修改业务规则,但找不到任何东西。

因此,我的问题是,管理基于环境的业务规则设置的最佳(最低维护)方法是什么?最好使用BizTalk部署框架。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-29 08:15:45

我将发布我使用的解决方案,以供将来参考,并帮助任何将来遇到这种情况的人。

在BizTalk部署框架中,可以向构建中添加额外的XML文件,并根据环境对绑定文件进行预处理。

下面是deployment.btdfproj文件的一些片段。不要忘记,使用BizTalk部署框架,订单是必不可少的:

代码语言:javascript
运行
复制
<!-- 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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24487942

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档