Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

New PowerShell module programmatically creates Designer Objects in Host Integration Server


View products that this article applies to.

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:

↑ Back to the top


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.

↑ Back to the top


References

Learn about the terminology Microsoft uses to describe software updates.

↑ Back to the top


Keywords: kbQFE, kbfix, kbBug, kbExpertiseInter, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 4013132
Revision : 14
Created on : 1/10/2018
Published on : 1/10/2018
Exists online : False
Views : 207