EDI Integrator 2016 Node.js Edition
EDI Integrator 2016 Node.js Edition
Questions / Feedback?

IncomingDirectory Property

The directory to be used to store incoming messages.

Syntax

 as2receiver.getIncomingDirectory([callback])
 as2receiver.setIncomingDirectory( incomingDirectory, [callback])

Default Value

""


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 the getIncomingDirectory([callback]) method is defined as:

function(err, data){ }

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

'data' is the value returned by the method.

The callback for the setIncomingDirectory([callback]) 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

If IncomingDirectory is set, the received message is stored as a file in that directory. If a filename is specified in the EDI message, the class will write to the specified filename, otherwise, a filename will be automatically generated based on a timestamp of the incoming transmission. In either case, if the filename exists on disk, the data will be written to the same name with a "-duplicate?" appended to the filename, where "?" is the number of duplicates.

Please note that the SetTPInfo method, if used, needs to be invoked before setting this property because it overrides the setting for incoming directory.

Data Type

String

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
EDI Integrator 2016 Node.js Edition - Version 16.0 [Build 7240]