Invoke_Record_¶
Invokes an operation in the application server.
NOTE: This is a protected method. Use Invoke_Record_Impersonate as first choice.
PROCEDURE Invoke_Record_ (
interface_ IN type_interface_,
method_ IN type_method_,
record_ IN OUT type_record_,
connection_string_ IN type_connection_string_ DEFAULT NULL
activity_ IN BOOLEAN DEFAULT FALSE );
PROCEDURE Invoke_Record_ (
interface_ IN type_interface_,
method_ IN type_method_,
document_ IN OUT Plsqlap_Document_API.Document,
connection_string_ IN type_connection_string_ DEFAULT NULL
activity_ IN BOOLEAN DEFAULT FALSE );
Parameters¶
interface_
Name of interface containing the requested operation.
method_
Name of requested operation.
record_
Input/Output record.
document_
Input/Output document. This is recommended to use version of procedure taking Document as parameter instead of Record.
connection_string_
Optional connection string to an application server. If no connection string is supplied the call will be to the application server set in the configuration (Set_Plsqlap_Environment).
activity_
If TRUE the call will be done to the Main Server rather then the Integration Server. Default FALSE.
Example¶
DECLARE
doc_ PLSQLAP_Document_API.Document;
id_ PLSQLAP_Document_API.Element_Id;
date_ DATE := to_date('2014-10-15 14:44','YYYY-MM-DD HH24:MI');
resp_ CLOB;
BEGIN
-- Prepare input data
doc_ := PLSQLAP_Document_API.New_Document('TEST_ORDER');
PLSQLAP_Document_API.Add_Attribute(doc_, 'COMMENTS', 'Outbound Sync - GetTestOrder');
PLSQLAP_Document_API.Add_Attribute(doc_, 'COMPANY', '01');
PLSQLAP_Document_API.Add_Attribute(doc_, 'DELIVERY_DATE', date_, type_ => PLSQLAP_Document_API.TYPE_TIMESTAMP);
PLSQLAP_Document_API.Add_Attribute(doc_, 'CUSTOMER_ID', test_id_);
id_ := PLSQLAP_Document_API.Add_Array(doc_, 'ORDER_LINES');
id_ := PLSQLAP_Document_API.Add_Document(doc_, 'TEST_ORDER_ITEM', id_);
PLSQLAP_Document_API.Add_Attribute(doc_, 'AMOUNT', 12324344, id_, PLSQLAP_Document_API.TYPE_FLOAT);
PLSQLAP_Document_API.Add_Attribute(doc_, 'PRICE', 812324344, id_, PLSQLAP_Document_API.TYPE_FLOAT);
PLSQLAP_Document_API.Add_Attribute(doc_, 'DESCRIPTION', 'Hello All', id_);
PLSQLAP_Document_API.Add_Attribute(doc_, 'PRODUCT_NO', 'A144522', id_);
-- Invoke interface
PLSQLAP_Server_API.Invoke_Record_('TestOrderInteraction', 'GetTestOrder', doc_);
END;