admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Quintiq file version 2.0
#parent: #root
Method SOAPExchangeDataOnFailure (LibDEF_IntegrationEvent event_i, String systemGUID_i, String systemHostName_i, 
  Number systemPortNumber_i, NamedValueTree nvt_i, Number soapErrorNumber_i, 
  String soapErrorText_i)
{
  Description: 'SOAP Client failure handler.'
  TextBody:
  [*
    // Complete the existing event
    if( not isnull( event_i ) )
    {
      // Intentionally not use Event hook here as we do not want to raise an error in this body, and we would like the error encountered to be displayed under "ErrorMessage"
      event_i.CreateActivity( "Failed to send data to " + LibDEF_Util::FormatCoordinateToString( systemHostName_i, systemPortNumber_i ) + " via SOAP",
                              false,                                                                                                                      // Activity should be categorized as "Failed"
                              "Error number: " + [String]soapErrorNumber_i + ', Error message: ' + soapErrorText_i );
    }
    
    // mark the system as unavailable (might need to filter by error unreachable)
    if( systemGUID_i.Length() > 0 )
    {
      LibDEF_System::MarkAvailability( this, systemGUID_i, false, event_i );
    }
    
    LibDEF_IntegrationEvent::EventComplete( event_i );
    
    // handle specific cases
    this.OnFailureExchangeData( nvt_i, systemGUID_i );
  *]
}