The GetMessage method transfers the response from the previous Send() to the instance that the GetMessage method is invoked on. The GetMessage() method is only available for a Class with:
AutomaticEntryCapable = True or IsExternal = True.
To retrieve the response from the previous Send() to <Instance>, AB Suite developers should issue:
<Instance>.GetMessage()
The GetMessage method transfers data returned from a Send, from the target ispec of the external application to the originating application.
The originating and target ispecs must have identical specifications.
Note: When executed in a co-routine, GetMessage sets the built-in segment attribute to NODB and the Glb.HubStatus built-in segment attribute to INVALID.The transfer is not completed if the Glb.Error built-in segment attribute is equal to a value other than the spaces when the GetMessage method is invoked. Changes to value of the Glb.Error built-in segment attribute after the GetMessage method is invoked have no effect on the Send.
Syntax
<<persistent class>>::GetMessage( ) : void
Owner
Any persistent class.
Parameters
None
Example
This example updates/retrieves the SellPrice attribute of the Prod ispec from the DBase1 application.
In DBase1, the Prod ispec has the following Main method:
If Maint = Glb.Inq : For database inquiry SellPrice := Prod.SellPrice Recall End
In the originating application, where Prod is also defined, the following method is specified:
Prod.Initialize() Prod.External(true) Glb.Destination := "DBase1" : Set the destination Prod.Product := FindProd : Product is the key for Prod If In_Maint <> Glb.Inq : For database update Prod.SellPrice := SellPrice End Prod.SetMaint(In_Maint) Prod.Send() : Send the automatic entry If Glb.Status = "NODB" Message Attention "DBase1 application not found" EndExit If Glb.Status = "*****" Message Attention "Rejected by DBase1 update program" EndExit If Glb.Status = "DATA" Prod.GetMessage() : Retrieve the response back into Prod. SellPrice := Prod.SellPrice Recall EndExit If Glb.Status = "BUSY" Message Attention "DBase1 application busy" EndExit