Przejdź do głównej zawartości
Pomoc techniczna
Zaloguj się przy użyciu konta Microsoft
Zaloguj się lub utwórz konto.
Witaj,
Wybierz inne konto.
Masz wiele kont
Wybierz konto, za pomocą którego chcesz się zalogować.
angielski
Przepraszamy, ten artykuł nie jest dostępny w Twoim języku.

Summary

Host Integration Server includes a Visual Studio Designer to enable creation of .hidx files that are used by various components of the HIS runtime to communicate with back-end systems. The creation of .hidx files through Studio Designer is strictly a manual operation. However, automating the generation of .hidx files through PowerShell can save time over the life of a project. Cumulative Update 2 enables the creation and modification of .hidx files through PowerShell.

Note that the 32-bit version of PowerShell must be used because components of 32-bit Visual Studio Designer are called. If the 64-bit version of PowerShell is used, an error message that resembles the following is logged:

The type initializer for 'Microsoft.HostIntegration.Importer.PowerShell.NewHisWipHidxFile' threw an exception.

More information

This update is included in Cumulative Update 2 for Host Integration Server 2016.

The following are the kinds of Host Integration Projects that can be created in Visual Studio:

  • BizTalk pipeline conversion

  • Host applications

  • Host files

  • Message queueing

After this update rollup is installed, you can create .hidx files for each of these project types through PowerShell. We recommend that you have some experience building .hidx files through Visual Studio Designer before you try to use PowerShell to create the files.

To use PowerShell, open the 32-bit Windows PowerShell ISE (x86), and then select Show Command Add-on on the View menu. On the Commands tab, select the Microsoft.HostIntegration.Importer.PowerShell module to display the list of PowerShell commands that are available.

Example

To perform the following tasks manually, follow these steps:

  1. Create a WIP hidx object.

  2. Add a method that is named GetAccounts.

  3. Add an input 30-character-string parameter that is named CustomerName.

  4. Add an input 6-character string parameter that is named AccountNum.

  5. Add an output decimal parameter that is named Balance that is PIC S9(7)V99.

  6. Save the WIP hidx object as a file. The hidx file is saved at C:\Lab. Be aware that the folder must exist to be able to create the $WIPhidx object.

To automate these tasks, run the following script in 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()

Note Additional example PowerShell scripts are available on GitHub.

References

Learn about the terminology Microsoft uses to describe software updates.

Potrzebujesz dalszej pomocy?

Chcesz uzyskać więcej opcji?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Czy te informacje były pomocne?

Co wpłynęło na Twoje wrażenia?
Jeśli naciśniesz pozycję „Wyślij”, Twoja opinia zostanie użyta do ulepszania produktów i usług firmy Microsoft. Twój administrator IT będzie mógł gromadzić te dane. Oświadczenie o ochronie prywatności.

Dziękujemy za opinię!

×