Post_Message

The Post_Message function asynchronously send an application message to all addresses. Any outbound routing rules will be applied before the message is sent. If multiple addresses are specified, either programmatically or by routing rules, the message is sent to all addresses.

This function returns immediately after the message has been successfully posted. The message will not actually be sent until the current transaction is committed. If a rollback occurs after Post_Message was called, the posted message is also rolled back.

PROCEDURE Post_Message (
   application_message_ IN OUT type_record_,
   sender_              IN     VARCHAR2 DEFAULT NULL,
   receiver_            IN     VARCHAR2 DEFAULT default_receiver_,
   message_type_        IN     VARCHAR2 DEFAULT default_media_code_,
   message_function_    IN     VARCHAR2 DEFAULT default_class_id_ );

Parameters

application_message
    The application message to post.

Record handling

Post_Message will automatically issue a PLSQLAP_Record_API.Clear_Record procedure call removing the input record.

Example

DECLARE
   am_ PLSQLAP_Record_API.type_record_;
   body_ PLSQLAP_Record_API.type_record_;
BEGIN
   -- create an application message
   am_ := PLSQLAP_Record_API.New_Record('APPLICATION_MESSAGE');
   PLSQLAP_Record_API.Set_Value(am_, 'MESSAGE_TYPE', 'TEST');
   
   body_ := PLSQLAP_Record_API.New_Record('TEXT_BODY');
   PLSQLAP_Record_API.Add_Aggregate(am_, 'TEXT_BODY', body_);
   PLSQLAP_Record_API.Set_Value(body_, 'TEXT_BODY_TYPE', 'STR');
   PLSQLAP_Record_API.Set_Value(body_, 'TEXT_VALUE', 'Hello world! from PLSQL access provider');

   -- post the message to IFS Connect. The message will be routed according to configured message routing
   PLSQLAP_Server_API.Post_Message(am_);
END;
/
COMMIT;