/AWS1/IF_IOJ=>UPDATEJOBEXECUTION()¶
About UpdateJobExecution¶
Updates the status of a job execution.
Requires permission to access the UpdateJobExecution action.
Method Signature¶
METHODS /AWS1/IF_IOJ~UPDATEJOBEXECUTION
IMPORTING
!IV_JOBID TYPE /AWS1/IOJJOBID OPTIONAL
!IV_THINGNAME TYPE /AWS1/IOJTHINGNAME OPTIONAL
!IV_STATUS TYPE /AWS1/IOJJOBEXECUTIONSTATUS OPTIONAL
!IT_STATUSDETAILS TYPE /AWS1/CL_IOJDETAILSMAP_W=>TT_DETAILSMAP OPTIONAL
!IV_STEPTIMEOUTINMINUTES TYPE /AWS1/IOJSTEPTIMEOUTINMINUTES OPTIONAL
!IV_EXPECTEDVERSION TYPE /AWS1/IOJEXPECTEDVERSION OPTIONAL
!IV_INCLUDEJOBEXECUTIONSTATE TYPE /AWS1/IOJINCLUDEEXECUTIONSTATE OPTIONAL
!IV_INCLUDEJOBDOCUMENT TYPE /AWS1/IOJINCLUDEJOBDOCUMENT OPTIONAL
!IV_EXECUTIONNUMBER TYPE /AWS1/IOJEXECUTIONNUMBER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iojupdatejobexecrsp
RAISING
/AWS1/CX_IOJCERTVALIDATIONEX
/AWS1/CX_IOJINVALIDREQUESTEX
/AWS1/CX_IOJINVSTATETRANSEX
/AWS1/CX_IOJRESOURCENOTFOUNDEX
/AWS1/CX_IOJSERVICEUNAVAILEX
/AWS1/CX_IOJTHROTTLINGEX
/AWS1/CX_IOJCLIENTEXC
/AWS1/CX_IOJSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_jobid TYPE /AWS1/IOJJOBID /AWS1/IOJJOBID¶
The unique identifier assigned to this job when it was created.
iv_thingname TYPE /AWS1/IOJTHINGNAME /AWS1/IOJTHINGNAME¶
The name of the thing associated with the device.
iv_status TYPE /AWS1/IOJJOBEXECUTIONSTATUS /AWS1/IOJJOBEXECUTIONSTATUS¶
The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED). This must be specified on every update.
Optional arguments:¶
it_statusdetails TYPE /AWS1/CL_IOJDETAILSMAP_W=>TT_DETAILSMAP TT_DETAILSMAP¶
Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
The maximum length of the value in the name/value pair is 1,024 characters.
iv_steptimeoutinminutes TYPE /AWS1/IOJSTEPTIMEOUTINMINUTES /AWS1/IOJSTEPTIMEOUTINMINUTES¶
Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling
UpdateJobExecution, setting the status toIN_PROGRESS, and specifying a new timeout value in this field) the job execution status will be automatically set toTIMED_OUT. Note that setting or resetting the step timeout has no effect on the in progress timeout that may have been specified when the job was created (CreateJobusing fieldtimeoutConfig).Valid values for this parameter range from 1 to 10080 (1 minute to 7 days). A value of -1 is also valid and will cancel the current step timer (created by an earlier use of
UpdateJobExecutionRequest).
iv_expectedversion TYPE /AWS1/IOJEXPECTEDVERSION /AWS1/IOJEXPECTEDVERSION¶
Optional. The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
iv_includejobexecutionstate TYPE /AWS1/IOJINCLUDEEXECUTIONSTATE /AWS1/IOJINCLUDEEXECUTIONSTATE¶
Optional. When included and set to true, the response contains the JobExecutionState data. The default is false.
iv_includejobdocument TYPE /AWS1/IOJINCLUDEJOBDOCUMENT /AWS1/IOJINCLUDEJOBDOCUMENT¶
Optional. When set to true, the response contains the job document. The default is false.
iv_executionnumber TYPE /AWS1/IOJEXECUTIONNUMBER /AWS1/IOJEXECUTIONNUMBER¶
Optional. A number that identifies a particular job execution on a particular device.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iojupdatejobexecrsp /AWS1/CL_IOJUPDATEJOBEXECRSP¶
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->updatejobexecution(
it_statusdetails = VALUE /aws1/cl_iojdetailsmap_w=>tt_detailsmap(
(
VALUE /aws1/cl_iojdetailsmap_w=>ts_detailsmap_maprow(
key = |string|
value = new /aws1/cl_iojdetailsmap_w( |string| )
)
)
)
iv_executionnumber = 123
iv_expectedversion = 123
iv_includejobdocument = ABAP_TRUE
iv_includejobexecutionstate = ABAP_TRUE
iv_jobid = |string|
iv_status = |string|
iv_steptimeoutinminutes = 123
iv_thingname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_jobexecutionstate = lo_result->get_executionstate( ).
IF lo_jobexecutionstate IS NOT INITIAL.
lv_jobexecutionstatus = lo_jobexecutionstate->get_status( ).
LOOP AT lo_jobexecutionstate->get_statusdetails( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_detailsvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_versionnumber = lo_jobexecutionstate->get_versionnumber( ).
ENDIF.
lv_jobdocument = lo_result->get_jobdocument( ).
ENDIF.