internal:proship:velocity:ils-event

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
internal:proship:velocity:ils-event [2026/07/14 09:49] lseadmininternal:proship:velocity:ils-event [2026/07/14 10:12] (current) – removed lseadmin
Line 1: Line 1:
-**Velocity PSS function to send request to ILS:** 
-<code> 
-Sub Ils_RunEvent(IlsEvent) 
- Dim IlsRq 
- Dim IlsEvXPath 
-  
- Select Case IlsEvent 
- Case "StartClient" 
- Set IlsRq = Sys 
- IlsEvXPath = "/SYSTEM/ILS" 
- Case Else 
- Set IlsRq = Shipment 
- IlsEvXPath = "/SHIPMENT/ILS" 
- End Select 
- 
- IlsRq.DeleteElement IlsEvXPath 
- IlsRq.E(IlsEvXPath & "/EVENT") = IlsEvent 
-  
- DMsgBox "Request" & vbLF & IlsRq.Xml 
- Dim ilsRsTxt  
- ilsRsTxt = TcpSend(Machine.ServerName, 3298, IlsRq.Xml & Chr(3), 30) 
- If Right(ilsRsTxt, 1) = Chr(3) Then 
- ilsRsTxt = Left(ilsRsTxt, Len(ilsRsTxt) - 1) 
- End If 
- 
- DMsgBox "Response" & vbLF & ilsRsTxt 
- Dim IlsRs 
- Set IlsRs = CreateProcReq() 
- IlsRs.Xml = ilsRsTxt 
- 'Debug_XML IlsRs.xml 
-  
- DMsgBox IlsRs.E(IlsEvXPath & "/STATUS") 
- If (CInt("0" & IlsRs.E(IlsEvXPath & "/STATUS")) > 0) Then 
- IlsRs.DeleteElement IlsEvXPath 
- Select Case IlsEvent 
- Case "StartClient" 
- 'Sys.Xml = IlsRs.Xml 
- Case Else 
- Shipment.Xml = IlsRs.Xml 
- End Select 
- End If 
-End Sub 
- 
-</code> 
- 
- 
-**Call the function like this within Velocity events:** 
-<code> 
-Sub LoadShipment() 
- Ils_RunEvent "LoadShipment" 
-End Sub 
- 
-Function PreShipShipment() 
- Ils_RunEvent "PRESHIP" 
-End Function 
- 
-Function PostShipShipment() 
- Ils_RunEvent "POSTSHIP" 
-End Function 
- 
-</code> 
- 
-ILS code (PreProcessRequestXML) should look for the /SHIPMENT/ILS/EVENT node, and run the appropriate function.  
-Once handled, ILS should set /SHIPMENT/ILS/STATUS = 1 (or greater than 0). The Ils_RunEvent function only loads the xml when STATUS > 0. 
  
  • internal/proship/velocity/ils-event.1784036981.txt.gz
  • Last modified: 2026/07/14 09:49
  • by lseadmin