/AWS1/IF_LMD=>GETDURABLEEXECUTIONHISTORY()¶
About GetDurableExecutionHistory¶
Retrieves the execution history for a durable execution, showing all the steps, callbacks, and events that occurred during the execution. This provides a detailed audit trail of the execution's progress over time.
The history is available while the execution is running and for a retention period after it completes (1-90 days, default 30 days). You can control whether to include execution data such as step results and callback payloads.
Method Signature¶
METHODS /AWS1/IF_LMD~GETDURABLEEXECUTIONHISTORY
IMPORTING
!IV_DURABLEEXECUTIONARN TYPE /AWS1/LMDDURABLEEXECUTIONARN OPTIONAL
!IV_INCLUDEEXECUTIONDATA TYPE /AWS1/LMDINCLUDEEXECUTIONDATA OPTIONAL
!IV_MAXITEMS TYPE /AWS1/LMDITEMCOUNT OPTIONAL
!IV_MARKER TYPE /AWS1/LMDSTRING OPTIONAL
!IV_REVERSEORDER TYPE /AWS1/LMDREVERSEORDER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmdgetdurableexhist01
RAISING
/AWS1/CX_LMDINVPARAMVALUEEX
/AWS1/CX_LMDRESOURCENOTFOUNDEX
/AWS1/CX_LMDSERVICEEXCEPTION
/AWS1/CX_LMDTOOMANYREQUESTSEX
/AWS1/CX_LMDCLIENTEXC
/AWS1/CX_LMDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_durableexecutionarn TYPE /AWS1/LMDDURABLEEXECUTIONARN /AWS1/LMDDURABLEEXECUTIONARN¶
The Amazon Resource Name (ARN) of the durable execution.
Optional arguments:¶
iv_includeexecutiondata TYPE /AWS1/LMDINCLUDEEXECUTIONDATA /AWS1/LMDINCLUDEEXECUTIONDATA¶
Specifies whether to include execution data such as step results and callback payloads in the history events. Set to
trueto include data, orfalseto exclude it for a more compact response. The default istrue.
iv_maxitems TYPE /AWS1/LMDITEMCOUNT /AWS1/LMDITEMCOUNT¶
The maximum number of history events to return per call. You can use
Markerto retrieve additional pages of results. The default is 100 and the maximum allowed is 1000. A value of 0 uses the default.
iv_marker TYPE /AWS1/LMDSTRING /AWS1/LMDSTRING¶
If
NextMarkerwas returned from a previous request, use this value to retrieve the next page of results. Each pagination token expires after 24 hours.
iv_reverseorder TYPE /AWS1/LMDREVERSEORDER /AWS1/LMDREVERSEORDER¶
When set to
true, returns the history events in reverse chronological order (newest first). By default, events are returned in chronological order (oldest first).
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmdgetdurableexhist01 /AWS1/CL_LMDGETDURABLEEXHIST01¶
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->getdurableexecutionhistory(
iv_durableexecutionarn = |string|
iv_includeexecutiondata = ABAP_TRUE
iv_marker = |string|
iv_maxitems = 123
iv_reverseorder = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_events( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_eventtype = lo_row_1->get_eventtype( ).
lv_operationsubtype = lo_row_1->get_subtype( ).
lv_eventid = lo_row_1->get_eventid( ).
lv_operationid = lo_row_1->get_id( ).
lv_operationname = lo_row_1->get_name( ).
lv_executiontimestamp = lo_row_1->get_eventtimestamp( ).
lv_operationid = lo_row_1->get_parentid( ).
lo_executionstarteddetails = lo_row_1->get_executionstarteddetails( ).
IF lo_executionstarteddetails IS NOT INITIAL.
lo_eventinput = lo_executionstarteddetails->get_input( ).
IF lo_eventinput IS NOT INITIAL.
lv_inputpayload = lo_eventinput->get_payload( ).
lv_truncated = lo_eventinput->get_truncated( ).
ENDIF.
lv_durationseconds = lo_executionstarteddetails->get_executiontimeout( ).
ENDIF.
lo_executionsucceededdetai = lo_row_1->get_execsucceededdetails( ).
IF lo_executionsucceededdetai IS NOT INITIAL.
lo_eventresult = lo_executionsucceededdetai->get_result( ).
IF lo_eventresult IS NOT INITIAL.
lv_operationpayload = lo_eventresult->get_payload( ).
lv_truncated = lo_eventresult->get_truncated( ).
ENDIF.
ENDIF.
lo_executionfaileddetails = lo_row_1->get_executionfaileddetails( ).
IF lo_executionfaileddetails IS NOT INITIAL.
lo_eventerror = lo_executionfaileddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_executiontimedoutdetail = lo_row_1->get_executiontimedoutdetails( ).
IF lo_executiontimedoutdetail IS NOT INITIAL.
lo_eventerror = lo_executiontimedoutdetail->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_executionstoppeddetails = lo_row_1->get_executionstoppeddetails( ).
IF lo_executionstoppeddetails IS NOT INITIAL.
lo_eventerror = lo_executionstoppeddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_contextstarteddetails = lo_row_1->get_contextstarteddetails( ).
IF lo_contextstarteddetails IS NOT INITIAL.
ENDIF.
lo_contextsucceededdetails = lo_row_1->get_contextsucceededdetails( ).
IF lo_contextsucceededdetails IS NOT INITIAL.
lo_eventresult = lo_contextsucceededdetails->get_result( ).
IF lo_eventresult IS NOT INITIAL.
lv_operationpayload = lo_eventresult->get_payload( ).
lv_truncated = lo_eventresult->get_truncated( ).
ENDIF.
ENDIF.
lo_contextfaileddetails = lo_row_1->get_contextfaileddetails( ).
IF lo_contextfaileddetails IS NOT INITIAL.
lo_eventerror = lo_contextfaileddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_waitstarteddetails = lo_row_1->get_waitstarteddetails( ).
IF lo_waitstarteddetails IS NOT INITIAL.
lv_durationseconds = lo_waitstarteddetails->get_duration( ).
lv_executiontimestamp = lo_waitstarteddetails->get_scheduledendtimestamp( ).
ENDIF.
lo_waitsucceededdetails = lo_row_1->get_waitsucceededdetails( ).
IF lo_waitsucceededdetails IS NOT INITIAL.
lv_durationseconds = lo_waitsucceededdetails->get_duration( ).
ENDIF.
lo_waitcancelleddetails = lo_row_1->get_waitcancelleddetails( ).
IF lo_waitcancelleddetails IS NOT INITIAL.
lo_eventerror = lo_waitcancelleddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_stepstarteddetails = lo_row_1->get_stepstarteddetails( ).
IF lo_stepstarteddetails IS NOT INITIAL.
ENDIF.
lo_stepsucceededdetails = lo_row_1->get_stepsucceededdetails( ).
IF lo_stepsucceededdetails IS NOT INITIAL.
lo_eventresult = lo_stepsucceededdetails->get_result( ).
IF lo_eventresult IS NOT INITIAL.
lv_operationpayload = lo_eventresult->get_payload( ).
lv_truncated = lo_eventresult->get_truncated( ).
ENDIF.
lo_retrydetails = lo_stepsucceededdetails->get_retrydetails( ).
IF lo_retrydetails IS NOT INITIAL.
lv_attemptcount = lo_retrydetails->get_currentattempt( ).
lv_durationseconds = lo_retrydetails->get_nextattemptdelayseconds( ).
ENDIF.
ENDIF.
lo_stepfaileddetails = lo_row_1->get_stepfaileddetails( ).
IF lo_stepfaileddetails IS NOT INITIAL.
lo_eventerror = lo_stepfaileddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
lo_retrydetails = lo_stepfaileddetails->get_retrydetails( ).
IF lo_retrydetails IS NOT INITIAL.
lv_attemptcount = lo_retrydetails->get_currentattempt( ).
lv_durationseconds = lo_retrydetails->get_nextattemptdelayseconds( ).
ENDIF.
ENDIF.
lo_chainedinvokestarteddet = lo_row_1->get_chainedinvokestarteddets( ).
IF lo_chainedinvokestarteddet IS NOT INITIAL.
lv_namespacedfunctionname = lo_chainedinvokestarteddet->get_functionname( ).
lv_tenantid = lo_chainedinvokestarteddet->get_tenantid( ).
lo_eventinput = lo_chainedinvokestarteddet->get_input( ).
IF lo_eventinput IS NOT INITIAL.
lv_inputpayload = lo_eventinput->get_payload( ).
lv_truncated = lo_eventinput->get_truncated( ).
ENDIF.
lv_versionwithlatestpublis = lo_chainedinvokestarteddet->get_executedversion( ).
lv_durableexecutionarn = lo_chainedinvokestarteddet->get_durableexecutionarn( ).
ENDIF.
lo_chainedinvokesucceededd = lo_row_1->get_chainedinvokesuccdetails( ).
IF lo_chainedinvokesucceededd IS NOT INITIAL.
lo_eventresult = lo_chainedinvokesucceededd->get_result( ).
IF lo_eventresult IS NOT INITIAL.
lv_operationpayload = lo_eventresult->get_payload( ).
lv_truncated = lo_eventresult->get_truncated( ).
ENDIF.
ENDIF.
lo_chainedinvokefaileddeta = lo_row_1->get_chainedinvokefaileddets( ).
IF lo_chainedinvokefaileddeta IS NOT INITIAL.
lo_eventerror = lo_chainedinvokefaileddeta->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_chainedinvoketimedoutde = lo_row_1->get_chainedinvoketmoutdets( ).
IF lo_chainedinvoketimedoutde IS NOT INITIAL.
lo_eventerror = lo_chainedinvoketimedoutde->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_chainedinvokestoppeddet = lo_row_1->get_chainedinvokestoppeddets( ).
IF lo_chainedinvokestoppeddet IS NOT INITIAL.
lo_eventerror = lo_chainedinvokestoppeddet->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_callbackstarteddetails = lo_row_1->get_callbackstarteddetails( ).
IF lo_callbackstarteddetails IS NOT INITIAL.
lv_callbackid = lo_callbackstarteddetails->get_callbackid( ).
lv_durationseconds = lo_callbackstarteddetails->get_heartbeattimeout( ).
lv_durationseconds = lo_callbackstarteddetails->get_timeout( ).
ENDIF.
lo_callbacksucceededdetail = lo_row_1->get_callbacksucceededdetails( ).
IF lo_callbacksucceededdetail IS NOT INITIAL.
lo_eventresult = lo_callbacksucceededdetail->get_result( ).
IF lo_eventresult IS NOT INITIAL.
lv_operationpayload = lo_eventresult->get_payload( ).
lv_truncated = lo_eventresult->get_truncated( ).
ENDIF.
ENDIF.
lo_callbackfaileddetails = lo_row_1->get_callbackfaileddetails( ).
IF lo_callbackfaileddetails IS NOT INITIAL.
lo_eventerror = lo_callbackfaileddetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_callbacktimedoutdetails = lo_row_1->get_callbacktimedoutdetails( ).
IF lo_callbacktimedoutdetails IS NOT INITIAL.
lo_eventerror = lo_callbacktimedoutdetails->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
lo_invocationcompleteddeta = lo_row_1->get_invccompleteddetails( ).
IF lo_invocationcompleteddeta IS NOT INITIAL.
lv_executiontimestamp = lo_invocationcompleteddeta->get_starttimestamp( ).
lv_executiontimestamp = lo_invocationcompleteddeta->get_endtimestamp( ).
lv_string = lo_invocationcompleteddeta->get_requestid( ).
lo_eventerror = lo_invocationcompleteddeta->get_error( ).
IF lo_eventerror IS NOT INITIAL.
lo_errorobject = lo_eventerror->get_payload( ).
IF lo_errorobject IS NOT INITIAL.
lv_errormessage = lo_errorobject->get_errormessage( ).
lv_errortype = lo_errorobject->get_errortype( ).
lv_errordata = lo_errorobject->get_errordata( ).
LOOP AT lo_errorobject->get_stacktrace( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_stacktraceentry = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_truncated = lo_eventerror->get_truncated( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nextmarker( ).
ENDIF.