PublishDebuggingInfo

This function is used for ION integrations with Optiva.

Purpose

PublishDebuggingInfo saves the string that you publish into the DEBUGLOG column in the FsActionWipResults table.

You can add as many strings as you want. Each time you run a script, you get a single row in the FsActionWipResults table. All the logging goes into that row; each line is separated by line breaks.

Syntax


PublishDebuggingInfo(Message, [Optional] Status)

Description

Suppose you have a script that is not working and you add some debugging.

  • Only one row is generated in the FsActionWipResults table.
  • The DEBUGLOG column has four lines in it. Each line is separated by a line break.

If you know the name of the Action and what time it was run, you can look up the row in the FsActionWipResults table. Read all the logging entries. See if it hit every debugging statement, or if it failed somewhere before finishing.

Example

The debugging code is in bold text and highlighted in blue.


Option Strict Off

Imports System

Imports System.Data

Imports System.Diagnostics

Class ActionScript
   Inherits FcProcFuncSetEventWF

   Function wf_start() As Long
      Dim ds As DataSet = ObjectDataSet("", "")

      Dim IngrTableName As String = DataSetTableName("", "", "INGR")

      PublishDebuggingInfo(“IngrTableName = “ & IngrTableName)

      Dim IngrTable As DataTable = ds.Tables(IngrTableName)

      Dim newIngrRow As DataRow = GetNewRow("", "", "INGR")

      newIngrRow("ITEM_CODE") = "01001"

      newIngrRow("QUANTITY") = 15.5

      newIngrRow("UOM_CODE") = "LB"
      PublishDebuggingInfo(“All values set into newIngrRow at this point”)

      RowUpdate("", "", "INGR", newIngrRow)

      PublishDebuggingInfo(“newIngrRow is updated”)

      CommitNewRow("", "", "INGR", newIngrRow)

      PublishDebuggingInfo(“newIngrRow is committed”)

      Return 111
   End Function
End Class