IPWorks EDI 2020 Node.js Edition

Questions / Feedback?

Restart Method

Restart sending of the file specified by the Etag property.

Syntax

as2sender.restart([callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method should be called when using the AS2 restart functionality. When called, the class will process the file and cache the processed contents to the RestartDirectory. Before sending, the Etag property will be populated with a unique Etag which identifies the processed file.

If sending is interrupted or fails, this method should be called to restart sending of the previously processed file starting where the interruption occurred. In order to restart from the last transfer, the Etag must be populated with the value from the last connection.

NOTE: When using restart functionality, the data is completely processed to the RestartDirectory before sending begins.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Node.js Edition - Version 20.0 [Build 8203]