/AWS1/IF_BDC=>GETEVENT()¶
About GetEvent¶
Retrieves information about a specific event in an AgentCore Memory resource.
To use this operation, you must have the bedrock-agentcore:GetEvent permission.
Method Signature¶
METHODS /AWS1/IF_BDC~GETEVENT
IMPORTING
!IV_MEMORYID TYPE /AWS1/BDCMEMORYID OPTIONAL
!IV_SESSIONID TYPE /AWS1/BDCSESSIONID OPTIONAL
!IV_ACTORID TYPE /AWS1/BDCACTORID OPTIONAL
!IV_EVENTID TYPE /AWS1/BDCEVENTID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcgeteventoutput
RAISING
/AWS1/CX_BDCACCESSDENIEDEX
/AWS1/CX_BDCINVALIDINPUTEX
/AWS1/CX_BDCRESOURCENOTFOUNDEX
/AWS1/CX_BDCSERVICEEXCEPTION
/AWS1/CX_BDCSERVICEQUOTAEXCDEX
/AWS1/CX_BDCTHROTTLEDEXCEPTION
/AWS1/CX_BDCVALIDATIONEX
/AWS1/CX_BDCCLIENTEXC
/AWS1/CX_BDCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_memoryid TYPE /AWS1/BDCMEMORYID /AWS1/BDCMEMORYID¶
The identifier of the AgentCore Memory resource containing the event.
iv_sessionid TYPE /AWS1/BDCSESSIONID /AWS1/BDCSESSIONID¶
The identifier of the session containing the event.
iv_actorid TYPE /AWS1/BDCACTORID /AWS1/BDCACTORID¶
The identifier of the actor associated with the event.
iv_eventid TYPE /AWS1/BDCEVENTID /AWS1/BDCEVENTID¶
The identifier of the event to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdcgeteventoutput /AWS1/CL_BDCGETEVENTOUTPUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->getevent(
iv_actorid = |string|
iv_eventid = |string|
iv_memoryid = |string|
iv_sessionid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_event = lo_result->get_event( ).
IF lo_event IS NOT INITIAL.
lv_memoryid = lo_event->get_memoryid( ).
lv_actorid = lo_event->get_actorid( ).
lv_sessionid = lo_event->get_sessionid( ).
lv_eventid = lo_event->get_eventid( ).
lv_timestamp = lo_event->get_eventtimestamp( ).
LOOP AT lo_event->get_payload( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_conversational = lo_row_1->get_conversational( ).
IF lo_conversational IS NOT INITIAL.
lo_content = lo_conversational->get_content( ).
IF lo_content IS NOT INITIAL.
lv_sensitivestring = lo_content->get_text( ).
ENDIF.
lv_role = lo_conversational->get_role( ).
ENDIF.
lo_value = lo_row_1->get_blob( ).
IF lo_value IS NOT INITIAL.
ENDIF.
ENDIF.
ENDLOOP.
lo_branch = lo_event->get_branch( ).
IF lo_branch IS NOT INITIAL.
lv_eventid = lo_branch->get_rooteventid( ).
lv_branchname = lo_branch->get_name( ).
ENDIF.
LOOP AT lo_event->get_metadata( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value_1 = ls_row_2-value.
IF lo_value_1 IS NOT INITIAL.
lv_string = lo_value_1->get_stringvalue( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.