Skip to main content

Configuring the Production

This topic describes how to configure a production to include an ASTM routing interface using the Interoperability > Configure > Production page.

Adding ASTM Business Services

Add one ASTM business service for each document type that the production will receive. If this document type arrives via multiple communication modes (for example, via FTP in addition to files), you will need a business service for each communication mode.

To add an ASTM business service to a production, use the Business Service Wizard as usual; see Configuring Productions. Select one of the following classes from the Service Class list:

Business Service Variation (EOTOPTIONAL)

InterSystems products also support a mode in which they receive consecutive ASTM E1394 messages not separated by ENQ/EOT control characters but just run together on the wire over a TCP connection. To enable this mode, create a subclass of one of the preceding business service classes, and add the following to your subclass:

Parameter EOTOPTIONAL = 1;

Then use this subclass in your production.

Adding ASTM Business Processes

The example ASTM device interface uses a business process called WorkAndRouteProcess. A business process like this one inherits from EnsLib.MsgRouter.VDocRoutingEngineOpens in a new tab, just like the business processes that you would use for documents in the X12 format. For instructions to create one, see Adding an X12 Business Process. Instructions for the routing rules and data transformations that might be required to support such a business process are also available in the same topic.

The ASTM testing interface uses a BPL business process called GenerateReplyProcess as its business process. The purpose of this business process is to generate an appropriate ASTM reply document, without actually connecting with a device. The source code for the sample BPL business process is as follows:

Class Test.ASTM.GenerateReplyProcess Extends Ens.BusinessProcessBPL
{

/// BPL Definition
XData BPL [ XMLNamespace = "http://www.intersystems.com/bpl" ]
{
<process language='objectscript'
         request='Ens.Request' response='Ens.Response'
         height='2000' width='2000' >
  <sequence xend='550' yend='300' >
    <assign name='CreateResponse' property='response'
            value='..%Process.NewResponse(request)' action='set'
            xpos='550' ypos='200' />
  </sequence>
</process>
}

Method NewResponse(pDocIn As EnsLib.EDI.ASTM.Document)
       As EnsLib.EDI.ASTM.Document
{
 Do {
  Set tDocOut=pDocIn.NewReplyDocument(,,.tSC)  Quit:$$$ISERR(tSC)
  #; Create correct number of blank segment objects in the output document
  For i=1:1:4 {
   Set tSC=tDocOut.SetSegmentAt(##class(EnsLib.EDI.ASTM.Segment).%New(),i)
   Quit:$$$ISERR(tSC)
  } Quit:$$$ISERR(tSC)
 Set tSC=tDocOut.SetValueAt("H|\^&|||",1)
 Set tSC=tDocOut.SetValueAt("P|1|315186|SH3F040230||ARNOUTS^A||19261201|W|",2)
 Set tSC=tDocOut.SetValueAt("O|1|0058224303||^^^BH05|R||||||A||||||||||||||Q",3)
 Set tSC=tDocOut.SetValueAt("L|1|F",4)
 } While 0
 If $$$ISERR(tSC) $$$LOGSTATUS(tSC)  Quit $$$NULLOREF
 Quit tDocOut
}

}

Adding ASTM Business Operations

Add an ASTM business operation for each output destination. You might also want to add a business operation to handle bad messages.

To add an ASTM business operation to a production, use the Business Operation Wizard as usual; see Configuring Productions. Select one of the following classes from the Operation Class list:

Connecting the ASTM Business Hosts

After you add the ASTM business hosts, connect these items as follows:

Configuring the Business Hosts

You should examine all the settings listed in Reference for Settings and set them as needed.

A couple of key settings for an ASTM business service are as follows:

  • Doc Schema Category — Specifies the schema category to assign to the inbound documents. InterSystems products require this information for validation and for search table indexing.

  • Search Table Class — Specifies the class to use to index virtual properties in the inbound documents.

  • For a File business service, also consider whether you need to configure the Reply Target Config Names setting.

  • (Optional) For a TCP business service, prepare the business service to initiate outgoing transmissions:

    Configure Out Separators and Response Timeout.

When ASTM is the protocol, a business operation needs a partner business service before it can initiate an outbound transmission to the device. The basic integration tasks are as follows:

  • (For the TCP business operation) Configure the Separators settings.

  • (For a partner TCP business service) Configure the Partner Service setting. Specify this is as the configuration name of the TCP business operation that sends documents to the device.

FeedbackOpens in a new tab