/AWS1/IF_LMD=>GETDURABLEEXECUTIONSTATE()¶
About GetDurableExecutionState¶
Retrieves the current execution state required for the replay process during durable function execution. This API is used by the Lambda durable functions SDK to get state information needed for replay. You typically don't need to call this API directly as the SDK handles state management automatically.
The response contains operations ordered by start sequence number in ascending order. Completed operations with children don't include child operation details since they don't need to be replayed.
Method Signature¶
METHODS /AWS1/IF_LMD~GETDURABLEEXECUTIONSTATE
IMPORTING
!IV_DURABLEEXECUTIONARN TYPE /AWS1/LMDDURABLEEXECUTIONARN OPTIONAL
!IV_CHECKPOINTTOKEN TYPE /AWS1/LMDCHECKPOINTTOKEN OPTIONAL
!IV_MARKER TYPE /AWS1/LMDSTRING OPTIONAL
!IV_MAXITEMS TYPE /AWS1/LMDITEMCOUNT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lmdgetdurableexstat01
RAISING
/AWS1/CX_LMDINVPARAMVALUEEX
/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.
iv_checkpointtoken TYPE /AWS1/LMDCHECKPOINTTOKEN /AWS1/LMDCHECKPOINTTOKEN¶
A checkpoint token that identifies the current state of the execution. This token is provided by the Lambda runtime and ensures that state retrieval is consistent with the current execution context.
Optional arguments:¶
iv_marker TYPE /AWS1/LMDSTRING /AWS1/LMDSTRING¶
If
NextMarkerwas returned from a previous request, use this value to retrieve the next page of operations. Each pagination token expires after 24 hours.
iv_maxitems TYPE /AWS1/LMDITEMCOUNT /AWS1/LMDITEMCOUNT¶
The maximum number of operations 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.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lmdgetdurableexstat01 /AWS1/CL_LMDGETDURABLEEXSTAT01¶
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->getdurableexecutionstate(
iv_checkpointtoken = |string|
iv_durableexecutionarn = |string|
iv_marker = |string|
iv_maxitems = 123
).
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_operations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_operationid = lo_row_1->get_id( ).
lv_operationid = lo_row_1->get_parentid( ).
lv_operationname = lo_row_1->get_name( ).
lv_operationtype = lo_row_1->get_type( ).
lv_operationsubtype = lo_row_1->get_subtype( ).
lv_executiontimestamp = lo_row_1->get_starttimestamp( ).
lv_executiontimestamp = lo_row_1->get_endtimestamp( ).
lv_operationstatus = lo_row_1->get_status( ).
lo_executiondetails = lo_row_1->get_executiondetails( ).
IF lo_executiondetails IS NOT INITIAL.
lv_inputpayload = lo_executiondetails->get_inputpayload( ).
ENDIF.
lo_contextdetails = lo_row_1->get_contextdetails( ).
IF lo_contextdetails IS NOT INITIAL.
lv_replaychildren = lo_contextdetails->get_replaychildren( ).
lv_operationpayload = lo_contextdetails->get_result( ).
lo_errorobject = lo_contextdetails->get_error( ).
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.
ENDIF.
lo_stepdetails = lo_row_1->get_stepdetails( ).
IF lo_stepdetails IS NOT INITIAL.
lv_attemptcount = lo_stepdetails->get_attempt( ).
lv_executiontimestamp = lo_stepdetails->get_nextattempttimestamp( ).
lv_operationpayload = lo_stepdetails->get_result( ).
lo_errorobject = lo_stepdetails->get_error( ).
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.
ENDIF.
lo_waitdetails = lo_row_1->get_waitdetails( ).
IF lo_waitdetails IS NOT INITIAL.
lv_executiontimestamp = lo_waitdetails->get_scheduledendtimestamp( ).
ENDIF.
lo_callbackdetails = lo_row_1->get_callbackdetails( ).
IF lo_callbackdetails IS NOT INITIAL.
lv_callbackid = lo_callbackdetails->get_callbackid( ).
lv_operationpayload = lo_callbackdetails->get_result( ).
lo_errorobject = lo_callbackdetails->get_error( ).
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.
ENDIF.
lo_chainedinvokedetails = lo_row_1->get_chainedinvokedetails( ).
IF lo_chainedinvokedetails IS NOT INITIAL.
lv_operationpayload = lo_chainedinvokedetails->get_result( ).
lo_errorobject = lo_chainedinvokedetails->get_error( ).
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.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nextmarker( ).
ENDIF.