/AWS1/IF_DOA=>UPDATEAPPROVALACTION()¶
About UpdateApprovalAction¶
Updates an approval request with the terminal decision (APPROVED or REJECTED). A single operation handles both verbs via the action enum.
Method Signature¶
METHODS /AWS1/IF_DOA~UPDATEAPPROVALACTION
IMPORTING
!IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEIDENTIFIER OPTIONAL
!IV_APPROVALID TYPE /AWS1/DOAAPPROVALID OPTIONAL
!IV_ACTION TYPE /AWS1/DOAAPPROVALACTIONTYPE OPTIONAL
!IO_FINALPATTERN TYPE REF TO /AWS1/CL_DOAAPPROVALPATTERN OPTIONAL
!IV_REASON TYPE /AWS1/DOAAPPROVALREASON OPTIONAL
!IV_TTLSECONDS TYPE /AWS1/DOAINTEGER OPTIONAL
!IV_SINGLEUSE TYPE /AWS1/DOABOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doaupdateappractrsp
RAISING
/AWS1/CX_DOAACCESSDENIEDEX
/AWS1/CX_DOACONFLICTEXCEPTION
/AWS1/CX_DOACONTENTSIZEEXCDEX
/AWS1/CX_DOAINTERNALSERVEREX
/AWS1/CX_DOAINVALIDPARAMETEREX
/AWS1/CX_DOARESOURCENOTFOUNDEX
/AWS1/CX_DOASERVICEQUOTAEXCDEX
/AWS1/CX_DOATHROTTLINGEX
/AWS1/CX_DOAVLDTNEXCEPTION
/AWS1/CX_DOACLIENTEXC
/AWS1/CX_DOASERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_agentspaceid TYPE /AWS1/DOAAGENTSPACEIDENTIFIER /AWS1/DOAAGENTSPACEIDENTIFIER¶
The agent space identifier — multi-tenant workspace scope. Bound from the request URI.
iv_approvalid TYPE /AWS1/DOAAPPROVALID /AWS1/DOAAPPROVALID¶
Identifier of the approval request being resolved. A UUID. Bound from the request URI.
iv_action TYPE /AWS1/DOAAPPROVALACTIONTYPE /AWS1/DOAAPPROVALACTIONTYPE¶
The action to take on the approval request — APPROVED or REJECTED.
Optional arguments:¶
io_finalpattern TYPE REF TO /AWS1/CL_DOAAPPROVALPATTERN /AWS1/CL_DOAAPPROVALPATTERN¶
The finalized pattern (tool + argumentPins) that scopes the approval. Required when
actionis APPROVED; must be absent whenactionis REJECTED. The pattern narrows, and must not widen, the invocation originally requested by the agent. This cross-field invariant is enforced by service-side validation.
iv_reason TYPE /AWS1/DOAAPPROVALREASON /AWS1/DOAAPPROVALREASON¶
Optional free-text rationale for the decision. Permitted when
actionis REJECTED; ignored whenactionis APPROVED.
iv_ttlseconds TYPE /AWS1/DOAINTEGER /AWS1/DOAINTEGER¶
Approval lifetime in seconds, starting from when the decision is submitted. Required when
actionis APPROVED ANDsingleUseis false; must be absent whenactionis REJECTED or whensingleUseis true (a single-use approval backs one executed action and the redemption window collapses). Cross-field invariants are enforced by service-side validation; the @range bound here is the operation-boundary check that always applies (a maximum of 4 hours).
iv_singleuse TYPE /AWS1/DOABOOLEAN /AWS1/DOABOOLEAN¶
Whether the approved action backs a single executed tool call (true) or is reusable within ttlSeconds (false). Required when
actionis APPROVED; must be absent whenactionis REJECTED. When true, ttlSeconds must be absent (the redemption window collapses to the single use). When false, ttlSeconds is required and bounds the reuse window. Cross-field invariants are enforced by service-side validation.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_doaupdateappractrsp /AWS1/CL_DOAUPDATEAPPRACTRSP¶
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->updateapprovalaction(
io_finalpattern = new /aws1/cl_doaapprovalpattern(
it_argumentpins = VALUE /aws1/cl_doaapprargumentpins_w=>tt_approvalargumentpins(
(
VALUE /aws1/cl_doaapprargumentpins_w=>ts_approvalargumentpins_maprow(
key = |string|
value = new /aws1/cl_doaapprargumentpins_w( |string| )
)
)
)
iv_tool = |string|
)
iv_action = |string|
iv_agentspaceid = |string|
iv_approvalid = |string|
iv_reason = |string|
iv_singleuse = ABAP_TRUE
iv_ttlseconds = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_approvalid = lo_result->get_approvalid( ).
lv_approvalstatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_expiresat( ).
ENDIF.