fferpcore.DeliveredMessageglobal inherited sharing abstract class DeliveredMessage implements Navigable A message delivery, with callbacks to respond. This class implements the following interfaces: Methods
getCorrelationIdglobal abstract String getCorrelationId() Return ValueA string identifying the data that comprises the source of the message, for example, the Id of an SObject. It should be a field with unique values to ensure it uniquely identifies the data source object. Sample Code
getBodyglobal abstract String getBody() Return ValueA JSON serialized string containing the message body. Sample Code
hasResponseglobal abstract Boolean hasResponse() Return ValueA boolean indicating whether or not the message has been successfully received. Sample Code
respondSuccessglobal abstract void respondSuccess() This method is called to indicate a message was handled successfully and changes have been committed to the database. Even if an exception is thrown after this method is called, the message will remain successful. Sample Code
respondErrorglobal abstract void respondError(fferpcore.ErpErrorBody body) This method can be called in the event of a validation error or other error handling the messsage. It stores details of the error on the message. Input Parameters
Sample Datafferpcore.ErpErrorBody body: new fferpcore.ErpErrorBody("Error"); Sample Code
respondFilteredglobal virtual void respondFiltered() This method can be called in the event of a message being ignored due to a filter. getMessageTypeglobal virtual String getMessageType() Return ValueThe DeveloperName__c from the messageType of this message. Sample Code
getDeserializedBodyglobal virtual Object getDeserializedBody() Assuming the message is JSON, return its deserializedUntyped form. This allows caching of the result. Return ValueThe result of calling JSON.deserializeUntyped on the message body. Sample Code
getValueglobal virtual Object getValue(fferpcore.Path path) Locates a specific value in the message at the given path. Input Parameters
Return ValueThe specific value at the given path. |