Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

摘要

主機整合伺服器包含 Visual Studio 設計工具,以便建立各種元件 HIS 執行階段用來與後端系統通訊的.hidx 檔案。.Hidx 檔案,透過 Studio 設計工具建立嚴格來說並手動作業。不過,如果產生的.hidx 檔案,透過 PowerShell自動化,可以可以節省時間的專案生命週期。累積的更新 2 」 可以讓建立和修改透過 PowerShell.hidx 檔。

請注意必須使用 PowerShell 的 32 位元版本,因為 Visual Studio 設計工具的 32 位元的元件會呼叫。如果使用 PowerShell 的 64 位元版本,則會記錄類似下列的錯誤訊息:

'Microsoft.HostIntegration.Importer.PowerShell.NewHisWipHidxFile' 的型別初始設定式擲回例外狀況。

其他資訊

此更新程式隨附累積的更新 2 ] 中,主應用程式整合伺服器 2016年的。

以下是可以在 Visual Studio 中建立的主應用程式整合專案類型:

  • BizTalk 管線轉換

  • 主應用程式

  • 主機檔案

  • 訊息佇列

安裝這個更新彙總套件之後,您可以針對每個透過 PowerShell 這些專案類型來建立.hidx 檔案。我們建議您有建置透過 Visual Studio 設計工具的.hidx 檔案,您嘗試使用 PowerShell,建立檔案之前的經驗。

若要使用 PowerShell,開啟 32 位元 Windows PowerShell ISE (x86),然後再選取 [檢視] 功能表上的 [顯示命令附加元件。在 [指令] 索引標籤上選取Microsoft.HostIntegration.Importer.PowerShell模組來顯示可用的 PowerShell 命令清單。

範例

若要以手動方式執行下列工作,請依照下列步驟執行:

  1. 建立 WIP 的 hidx 物件。

  2. 加入名為GetAccounts的方法。

  3. 新增名為客戶名稱輸入的 30 字元字串參數。

  4. 新增一個名為AccountNum的 6 個字元的輸入的字串參數。

  5. 新增名為平衡PIC S9 的輸出小數參數 (7) V99。

  6. WIP 的 hidx 物件另存檔案。Hidx 檔案會儲存在 C:\Lab。 留意的資料夾必須存在,才能夠建立 $WIPhidx 物件。

若要自動化這些工作,請在 PowerShell 中執行下列指令碼:

$WIPhidx = New-HisWipHidxFile -ElmUserData -Name MyNamespace -Interface IMyInterface -
Description "My Description" -File C:\Lab\WIPSample.hidx
$WIPMethod = Add-HisHidxElement -InputObject $WIPhidx -Method -Name GetAccounts
$NameParameter = $WIPMethod | Add-HisHidxParameter -Name CustomerName -Atomic
$NameParameter.Direction = "In"
$NameParameter.DataType = "String"
$NameParameter.ConversionInformation.Size = 30
$AccountParameter = $WIPMethod | Add-HisHidxParameter -Name AccountNum -Atomic
$AccountParameter.Direction = "In"
$AccountParameter.DataType = "String"
$AccountParameter.ConversionInformation.Size = 6
$BalanceParameter = $WIPMethod | Add-HisHidxParameter -Name Balance -Atomic
$BalanceParameter.Direction = "Out"
$BalanceParameter.DataType = "Decimal"
$BalanceParameter.ConversionInformation.HostDataType = "PIC S9(n)V9(n) COMP-3"
$BalanceParameter.ConversionInformation.Precision = 7
$BalanceParameter.ConversionInformation.Scale = 2
$WIPhidx.Save()

注意其他範例 PowerShell 指令碼可以使用GitHub

參考

了解 Microsoft 用來描述軟體更新的有關的術語

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×