Skip to content

/AWS1/IF_TBD=>BATCHGETSESSIONACTION()

About BatchGetSessionAction

Retrieves multiple session actions in a single request. This is a batch version of the GetSessionAction API.

The result of getting each session action is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

Method Signature

METHODS /AWS1/IF_TBD~BATCHGETSESSIONACTION
  IMPORTING
    !IT_IDENTIFIERS TYPE /AWS1/CL_TBDBATCHGETSESSACTID=>TT_BATCHGETSESSACTIONIDNTFRS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tbdbatchgetsessactrsp
  RAISING
    /AWS1/CX_TBDACCESSDENIEDEX
    /AWS1/CX_TBDINTERNALSERVERER00
    /AWS1/CX_TBDTHROTTLINGEX
    /AWS1/CX_TBDVALIDATIONEX
    /AWS1/CX_TBDCLIENTEXC
    /AWS1/CX_TBDSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_identifiers TYPE /AWS1/CL_TBDBATCHGETSESSACTID=>TT_BATCHGETSESSACTIONIDNTFRS TT_BATCHGETSESSACTIONIDNTFRS

The list of session action identifiers to retrieve. You can specify up to 100 identifiers per request.

RETURNING

oo_output TYPE REF TO /aws1/cl_tbdbatchgetsessactrsp /AWS1/CL_TBDBATCHGETSESSACTRSP

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->batchgetsessionaction(
  it_identifiers = VALUE /aws1/cl_tbdbatchgetsessactid=>tt_batchgetsessactionidntfrs(
    (
      new /aws1/cl_tbdbatchgetsessactid(
        iv_farmid = |string|
        iv_jobid = |string|
        iv_queueid = |string|
        iv_sessionactionid = |string|
      )
    )
  )
).

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_sessionactions( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_farmid = lo_row_1->get_farmid( ).
      lv_queueid = lo_row_1->get_queueid( ).
      lv_jobid = lo_row_1->get_jobid( ).
      lv_sessionactionid = lo_row_1->get_sessionactionid( ).
      lv_sessionactionstatus = lo_row_1->get_status( ).
      lv_startedat = lo_row_1->get_startedat( ).
      lv_endedat = lo_row_1->get_endedat( ).
      lv_timestamp = lo_row_1->get_workerupdatedat( ).
      lv_sessionactionprogresspe = lo_row_1->get_progresspercent( ).
      LOOP AT lo_row_1->get_manifests( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_string = lo_row_3->get_outputmanifestpath( ).
          lv_string = lo_row_3->get_outputmanifesthash( ).
        ENDIF.
      ENDLOOP.
      lv_sessionid = lo_row_1->get_sessionid( ).
      lv_processexitcode = lo_row_1->get_processexitcode( ).
      lv_sessionactionprogressme = lo_row_1->get_progressmessage( ).
      LOOP AT lo_row_1->get_acquiredlimits( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_limitid = lo_row_5->get_limitid( ).
          lv_minonemaxinteger = lo_row_5->get_count( ).
        ENDIF.
      ENDLOOP.
      lo_sessionactiondefinition = lo_row_1->get_definition( ).
      IF lo_sessionactiondefinition IS NOT INITIAL.
        lo_environmententersession = lo_sessionactiondefinition->get_enventer( ).
        IF lo_environmententersession IS NOT INITIAL.
          lv_environmentid = lo_environmententersession->get_environmentid( ).
        ENDIF.
        lo_environmentexitsessiona = lo_sessionactiondefinition->get_envexit( ).
        IF lo_environmentexitsessiona IS NOT INITIAL.
          lv_environmentid = lo_environmentexitsessiona->get_environmentid( ).
        ENDIF.
        lo_taskrunsessionactiondef = lo_sessionactiondefinition->get_taskrun( ).
        IF lo_taskrunsessionactiondef IS NOT INITIAL.
          lv_taskid = lo_taskrunsessionactiondef->get_taskid( ).
          lv_stepid = lo_taskrunsessionactiondef->get_stepid( ).
          LOOP AT lo_taskrunsessionactiondef->get_parameters( ) into ls_row_6.
            lv_key = ls_row_6-key.
            lo_value = ls_row_6-value.
            IF lo_value IS NOT INITIAL.
              lv_intstring = lo_value->get_int( ).
              lv_floatstring = lo_value->get_float( ).
              lv_parameterstring = lo_value->get_string( ).
              lv_pathstring = lo_value->get_path( ).
              lv_string = lo_value->get_chunkint( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
        lo_syncinputjobattachments = lo_sessionactiondefinition->get_syncinputjobattachments( ).
        IF lo_syncinputjobattachments IS NOT INITIAL.
          lv_stepid = lo_syncinputjobattachments->get_stepid( ).
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_errors( ) into lo_row_7.
    lo_row_8 = lo_row_7.
    IF lo_row_8 IS NOT INITIAL.
      lv_farmid = lo_row_8->get_farmid( ).
      lv_queueid = lo_row_8->get_queueid( ).
      lv_jobid = lo_row_8->get_jobid( ).
      lv_sessionactionid = lo_row_8->get_sessionactionid( ).
      lv_batchgetsessionactioner = lo_row_8->get_code( ).
      lv_string = lo_row_8->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Get multiple session actions in a single request

Get multiple session actions in a single request

DATA(lo_result) = lo_client->batchgetsessionaction(
  it_identifiers = VALUE /aws1/cl_tbdbatchgetsessactid=>tt_batchgetsessactionidntfrs(
    (
      new /aws1/cl_tbdbatchgetsessactid(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-1234567890abcdef1234567890abcdef|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_sessionactionid = |sessionaction-1234567890abcdef1234567890abcdef-0|
      )
    )
    (
      new /aws1/cl_tbdbatchgetsessactid(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-1234567890abcdef1234567890abcdef|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_sessionactionid = |sessionaction-1234567890abcdef1234567890abcdef-1|
      )
    )
  )
).