/AWS1/IF_WAD=>GETAGENTRECGENERATION()¶
About GetAgentRecommendationGeneration¶
Retrieves information about a recommendation generation process, including its status, progress, and results. Recommendation generation is asynchronous: poll this operation until status reaches a terminal value of COMPLETED (results are ready) or ERROR (see errorDetails). Intermediate values are QUEUED and IN_PROGRESS.
Method Signature¶
METHODS /AWS1/IF_WAD~GETAGENTRECGENERATION
IMPORTING
!IV_PROFILEARN TYPE /AWS1/WADAGENTPROFILEARN OPTIONAL
!IV_GENERATIONID TYPE /AWS1/WADUUID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wadgetagntrecgenerrsp
RAISING
/AWS1/CX_WADACCESSDENIEDEX
/AWS1/CX_WADINTERNALSERVEREX
/AWS1/CX_WADRESOURCENOTFOUNDEX
/AWS1/CX_WADTHROTTLINGEX
/AWS1/CX_WADVALIDATIONEX
/AWS1/CX_WADCLIENTEXC
/AWS1/CX_WADSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_profilearn TYPE /AWS1/WADAGENTPROFILEARN /AWS1/WADAGENTPROFILEARN¶
The ARN of the optimization profile associated with this generation.
iv_generationid TYPE /AWS1/WADUUID /AWS1/WADUUID¶
The unique identifier of the recommendation generation to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wadgetagntrecgenerrsp /AWS1/CL_WADGETAGNTRECGENERRSP¶
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->getagentrecgeneration(
iv_generationid = |string|
iv_profilearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_uuid = lo_result->get_id( ).
lv_agentprofilearn = lo_result->get_profilearn( ).
lv_string = lo_result->get_name( ).
lv_generationstatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_estimatedcompletiontime( ).
lv_string = lo_result->get_createdby( ).
lv_timestamp = lo_result->get_createdat( ).
lv_string = lo_result->get_lastmodifiedby( ).
lv_timestamp = lo_result->get_lastmodifiedat( ).
lo_/aws1/cl_rt_document = lo_result->get_additionalcontext( ).
IF lo_/aws1/cl_rt_document IS NOT INITIAL.
ENDIF.
lo_scope = lo_result->get_scope( ).
IF lo_scope IS NOT INITIAL.
LOOP AT lo_scope->get_pillars( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_pillar = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_scope->get_goalids( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_uuid = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_scope->get_items( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_pillar = lo_row_5->get_pillar( ).
LOOP AT lo_row_5->get_ids( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_itemid = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lv_timestamp = lo_result->get_startedat( ).
lv_timestamp = lo_result->get_endedat( ).
lo_progress = lo_result->get_progress( ).
IF lo_progress IS NOT INITIAL.
lv_integer = lo_progress->get_stepscompleted( ).
lv_integer = lo_progress->get_totalsteps( ).
lv_double = lo_progress->get_completionpercentage( ).
ENDIF.
lo_errordetails = lo_result->get_errordetails( ).
IF lo_errordetails IS NOT INITIAL.
lv_string = lo_errordetails->get_code( ).
lv_string = lo_errordetails->get_message( ).
ENDIF.
ENDIF.