/AWS1/IF_DOA=>CREATETRIGGER()¶
About CreateTrigger¶
Creates a new Trigger in the specified agent space
Method Signature¶
METHODS /AWS1/IF_DOA~CREATETRIGGER
IMPORTING
!IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
!IV_TYPE TYPE /AWS1/DOATRIGGERTYPE OPTIONAL
!IO_CONDITION TYPE REF TO /AWS1/CL_DOATRIGGERCONDITION OPTIONAL
!IO_ACTION TYPE REF TO /AWS1/CL_RT_DOCUMENT OPTIONAL
!IV_STATUS TYPE /AWS1/DOATRIGGERSTATUS OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/DOASTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doacreatetriggerrsp
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/DOAAGENTSPACEID /AWS1/DOAAGENTSPACEID¶
The unique identifier for the agent space where the Trigger will be created
iv_type TYPE /AWS1/DOATRIGGERTYPE /AWS1/DOATRIGGERTYPE¶
How the new Trigger fires
io_condition TYPE REF TO /AWS1/CL_DOATRIGGERCONDITION /AWS1/CL_DOATRIGGERCONDITION¶
The condition that fires the new Trigger
io_action TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT¶
The action the new Trigger performs when it fires
Optional arguments:¶
iv_status TYPE /AWS1/DOATRIGGERSTATUS /AWS1/DOATRIGGERSTATUS¶
The initial status of the Trigger
iv_clienttoken TYPE /AWS1/DOASTRING /AWS1/DOASTRING¶
A unique, case-sensitive identifier used for idempotent Trigger creation
RETURNING¶
oo_output TYPE REF TO /aws1/cl_doacreatetriggerrsp /AWS1/CL_DOACREATETRIGGERRSP¶
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->createtrigger(
io_action = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
io_condition = new /aws1/cl_doatriggercondition( new /aws1/cl_doaschedulecondition( |string| ) )
iv_agentspaceid = |string|
iv_clienttoken = |string|
iv_status = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_trigger = lo_result->get_trigger( ).
IF lo_trigger IS NOT INITIAL.
lv_resourceid = lo_trigger->get_triggerid( ).
lv_agentspaceid = lo_trigger->get_agentspaceid( ).
lv_triggertype = lo_trigger->get_type( ).
lo_triggercondition = lo_trigger->get_condition( ).
IF lo_triggercondition IS NOT INITIAL.
lo_schedulecondition = lo_triggercondition->get_schedule( ).
IF lo_schedulecondition IS NOT INITIAL.
lv_scheduleexpression = lo_schedulecondition->get_expression( ).
ENDIF.
ENDIF.
lo_/aws1/cl_rt_document = lo_trigger->get_action( ).
IF lo_/aws1/cl_rt_document IS NOT INITIAL.
ENDIF.
lv_triggerstatus = lo_trigger->get_status( ).
lv_timestamp = lo_trigger->get_createdat( ).
lv_timestamp = lo_trigger->get_updatedat( ).
ENDIF.
ENDIF.