Send methods
Last updated
Last updated
Method name | Parameters | Description |
---|---|---|
validate
n/a
To check the statement data as provided for validity (before sending) Returns: Boolean
sendSync
n/a
To send the statement (if valid, validity is checked before the send is attempted) to the LRS as configured in a synchronous manner – i.e. get a return value (Boolean) which determines whether the statement was sent successfully or not. Note this method can only be called in a valid, synchronous context, such as a direct class execution. If the statement is instantiated in an invalid context (e.g. via @invocablemethod) then sendAsync must be used instead. If called in the wrong context then the method will not in fact be executed, and a statement will not be sent. Returns: Boolean
sendAsync
n/a
To send the statement (if valid, validity is checked before the send is attempted) to the LRS as configured in an asynchronous manner. Note: this method executes as a @future, therefore asynchronously and in a separate thread to the callee. It will run but control will be immediately passed back to the calling code and its execution will continue whilst the method thread runs to completion. It should be called in circumstances where the processing environment allows, and where the completion status of the statement send is not required to determine any subsequent code. In such cases, the audit log object can be used to trigger this type of processing which can query the log record and associated status/data. Returns: void