PublishIONDoc

This function is used to publish XML documents to the Optiva Outbox, for consumption by ION.

Purpose

PublishIONDoc publishes well formatted BODs from the ION Scripting library. This function can also be used to publish non-standard XMLs that ION should route.

Syntax

PublishIONDoc(theBod, _OBJECTSYMBOL, _OBJECTKEY, _ToLogicalId)

Example for routing non-standard XMLs with ION

This is a script that can be used to test PublishIONDoc publishing non-standard XML to be routed by ION:

Option Strict Off
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.IO
Imports System.Linq
Imports System.Xml.Linq
Imports IONBaseV262

Class ActionScript Inherits IONPub

Function wf_start() As Long
      _BODType  = "SYNC.FSXMLBOM"
      _ToLogicalId = "lid://default"   

     'Build the Document
     Dim elem As XElement = <Root>
                                                  <Parent>
                                                        <ID>Chuck</ID>
                                                        <Child>Susie</Child>
                                                        <Child>Bill</Child>
                                                   </Parent>
                                                </Root>

Dim theBod As XDocument = New XDocument(elem)

PublishIONDoc(theBod, _OBJECTSYMBOL, _OBJECTKEY, _ToLogicalId)

Return 111
End Function

Protected Overrides Sub ConstantOverride()

'Do nothing here

End Sub

Protected Overrides Sub ParametersToExport()
'This is a VB.NET List of all the Parameters you want to export
'_ExportParams.Add("ASH")
_ExportParams.Add("DENSITY")
_ExportParams.Add("FORMULA COST")
_ExportParams.Add("MOISTURE")

End Sub

Protected Overrides Sub ContextToExport()
'This is a VB.NET List of all the Set Codes you want to export
_Context.Add("SELLOC")
_Context.Add("C_ENDUSE")
End Sub

Protected Overrides Sub CustomFieldsToExport()
_CustomFieldExport.Add(New BODNode("DIVISION", "Division", DataType.dataString))
End Sub

End Class