IBM Support

ON_SUCCESS Event of SHIP_CONFIRM Transaction Not Fired

Troubleshooting


Problem

ON_SUCCESS Event of SHIP_CONFIRM Transaction Not Fired

Symptom

The ON_SUCCESS event of the SHIP_CONFIRM transaction is not fired when the confirmShipment() API is executed.
PART: Platform-Config 2.0 SP3 Platform
COMPONENT: Transactions
OS: Windows NT - 4.0 SP 3
DATABASE: Oracle - 7.3.2
WEB SERVER: IIS - 3.0
WEB BROWSER: Internet Explorer - 5.0

Cause

Resolving The Problem

This is caused by the createEnvironment() API being called without a progID corresponding to a valid Transaction_id.

The createEnvironment() API takes the parameters (VARIANT * vEnvHandle,[in]BSTR sProgID, [in]BSTR sUserID,[out, retval]int * iRetval). The Pre-Condition for this API is that the sProgID corresponds to a valid Transaction_id. If this is not the case, the API executes successfully, but is not able to trigger the corresponding event.

For example, in the case of SHIP_CONFIRM, the progID should be equal to "SHIP_CONFIRM". Usually, when a custom agent is written using confirmShipment(), it is recommended to create a new user transaction and specify it as a progID. In case of an error, this enables the error log to show that the error is not from Platform confirmShipment() call but from the custom agent calling the API.

A sample code using the COM version of this API is given below:

Private Sub testConfirmShipment(lenv As Variant, inXML As Variant, outXML As Variant, iRetVal As Long, errXML As Variant)
iRetVal = 0
Dim tempLenv As Variant
iRetVal = oUtil.createEnvironment(tempLenv, "SHIP_CONFIRM", "SHIP_CONFIRM")
iRetVal = oUtil.beginTransaction(tempLenv)
iRetVal = oUtil.confirmShipment(tempLenv, inXML, outXML, errXML)
If (iRetVal <> 0) Then
oUtil.rollback (tempLenv)
Else
oUtil.commit (tempLenv)
End If

End Sub

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI48468

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21544245