首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BizTalk ListApp命令行

BizTalk ListApp命令行
EN

Stack Overflow用户
提问于 2013-08-28 04:38:23
回答 1查看 747关注 0票数 1

我在c#中使用了以下代码来从BizTalk服务器中部署的应用程序中获取策略\规则。

代码语言:javascript
复制
BTSTask.exe ListApp -ApplicationName:"EAISolution" -ResourceSpec:"c:\EAISolution.PolicyInf
o.xml" /Server:VHYDTRBELSUP-02 /Database:BizTalkMgmtDb

从上面的命令中,我得到了如下输出

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-16" ?> 
<ResourceSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                              xmlns:xsd="http://www.w3.org/2001/XMLSchema" ApplicationName="EAISolution" xmlns="http://schemas.microsoft.com/BizTalk/ApplicationDeployment/ResourceSpec/2004/12">
<Resources>
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="EAIOrchestration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" /> 
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="EAIServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" /> 
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="FFSchemasTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" /> 
<Resource Type="System.BizTalk:Rules" Luid="RULE/ProcessPurchaseOrder/1.0" /> 
<Resource Type="System.BizTalk:BizTalkBinding" Luid="Application/EAISolution" /> 
</Resources>
</ResourceSpec>

在BizTalk服务器上,我使用BizTalk服务器管理中的策略导出获得了以下输出

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8" ?> 
<brl xmlns="http://schemas.microsoft.com/businessruleslanguage/2002">
<ruleset name="ProcessPurchaseOrder">
<version major="1" minor="0" description="" modifiedby="username" date="2013-05- 27T12:04:55.6121122+05:30" /> 
<configuration /> 
<bindings>
<xmldocument ref="xml_31" doctype="RuleTest.PO" instances="16" selectivity="1" instance="0">
<selector>/*[local-name()='PurchaseOrder' and namespace-uri() ='http://EAISolution.PurchaseOrder']/*[local-name()='Item' and namespace-uri()='']</selector> 
<selectoralias>/PurchaseOrder/Item</selectoralias> 
<schema>....\PO.xsd</schema> 
</xmldocument>
<xmldocument ref="xml_32" doctype="RuleTest.PO" instances="16" selectivity="1" instance="0">
<selector>/*[local-name()='PurchaseOrder' and namespace-uri()='http://EAISolution.PurchaseOrder']    
</selector> 
<selectoralias>/PurchaseOrder</selectoralias> 
<schema>....\PO.xsd</schema> 
</xmldocument>
</bindings>
<rule name="ApprovalRule" priority="0" active="true">
<if>
<compare operator="less than or equal to">
<vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="d4eb2deb-06d3-42c4-af49-ceb21331b1cc" /> 
<lhs>
<function>
<xmldocumentmember xmldocumentref="xml_31" type="int" sideeffects="false">
<field>*[local-name()='Quantity' and namespace-uri()='']</field> 
<fieldalias>Quantity</fieldalias> 
</xmldocumentmember>
</function>
</lhs>
<rhs>
<constant>
<int>500</int> 
</constant>
</rhs>
</compare>
</if>
<then>
<function>
<xmldocumentmember xmldocumentref="xml_32" type="string" sideeffects="true">
<field>*[local-name()='Status' and namespace-uri()='']</field> 
<fieldalias>Status</fieldalias> 
<argument>
<constant>
<string>Approved</string> 
</constant>
</argument>
</xmldocumentmember>
</function>
</then>
</rule>
</ruleset>
</brl>

所以请告诉我如何使用命令行获得第二个输出。

EN

回答 1

Stack Overflow用户

发布于 2013-08-28 22:29:44

BTSTask只会将策略导出为MSI的一部分(见下文)。然后,您可以提取MSI (请参阅如何从命令行提取msu/msp/msi文件)来获取策略文件。

来自如何导入保单

  • BTSTask没有提供用于导入(或导出)策略的特定命令;但是,您可以使用BTSTask的ExportApp命令选择性地导出您想要的应用程序中的策略,包括没有其他应用程序构件。然后可以使用ImportApp命令将.msi文件导入到不同BizTalk组中的应用程序中。这是本主题中描述的方法。执行此操作时,策略将自动导入并在BizTalk组中发布,并添加到指定的应用程序中。

下面的步骤将导出策略,但作为MSI的一部分。

来自如何出口政策

  • 使用BTSTask ListApp命令和/ResourceSpec选项生成一个/ResourceSpec文件,该文件列出要从BizTalk应用程序导出策略的工件,如ListApp命令所述。编辑上一步中生成的XML文件,删除除要导出的策略或策略以外的所有工件。使用BTSTask ExportApp命令,并为/ResourceSpec参数指定修改后的/ResourceSpec文件。有关更多信息,请参见ExportApp命令。BTSTask将指定的策略及其所有相关词汇表导出到应用程序.msi文件中。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18479565

复制
相关文章

相似问题

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