Skip to content

/AWS1/IF_GLU=>GETSESSION()

About GetSession

Retrieves the session.

Method Signature

METHODS /AWS1/IF_GLU~GETSESSION
  IMPORTING
    !IV_ID TYPE /AWS1/GLUNAMESTRING OPTIONAL
    !IV_REQUESTORIGIN TYPE /AWS1/GLUORCHESTRATIONNAMESTR OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_glugetsessionresponse
  RAISING
    /AWS1/CX_GLUACCESSDENIEDEX
    /AWS1/CX_GLUENTITYNOTFOUNDEX
    /AWS1/CX_GLUINTERNALSERVICEEX
    /AWS1/CX_GLUINVALIDINPUTEX
    /AWS1/CX_GLUOPERATIONTIMEOUTEX
    /AWS1/CX_GLUCLIENTEXC
    /AWS1/CX_GLUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_id TYPE /AWS1/GLUNAMESTRING /AWS1/GLUNAMESTRING

The ID of the session.

Optional arguments:

iv_requestorigin TYPE /AWS1/GLUORCHESTRATIONNAMESTR /AWS1/GLUORCHESTRATIONNAMESTR

The origin of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_glugetsessionresponse /AWS1/CL_GLUGETSESSIONRESPONSE

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->getsession(
  iv_id = |string|
  iv_requestorigin = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_session = lo_result->get_session( ).
  IF lo_session IS NOT INITIAL.
    lv_namestring = lo_session->get_id( ).
    lv_timestampvalue = lo_session->get_createdon( ).
    lv_sessionstatus = lo_session->get_status( ).
    lv_descriptionstring = lo_session->get_errormessage( ).
    lv_descriptionstring = lo_session->get_description( ).
    lv_orchestrationrolearn = lo_session->get_role( ).
    lo_sessioncommand = lo_session->get_command( ).
    IF lo_sessioncommand IS NOT INITIAL.
      lv_namestring = lo_sessioncommand->get_name( ).
      lv_pythonversionstring = lo_sessioncommand->get_pythonversion( ).
    ENDIF.
    LOOP AT lo_session->get_defaultarguments( ) into ls_row.
      lv_key = ls_row-key.
      lo_value = ls_row-value.
      IF lo_value IS NOT INITIAL.
        lv_orchestrationargumentsv = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
    lo_connectionslist = lo_session->get_connections( ).
    IF lo_connectionslist IS NOT INITIAL.
      LOOP AT lo_connectionslist->get_connections( ) into lo_row_1.
        lo_row_2 = lo_row_1.
        IF lo_row_2 IS NOT INITIAL.
          lv_connectionstring = lo_row_2->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_doublevalue = lo_session->get_progress( ).
    lv_nullabledouble = lo_session->get_maxcapacity( ).
    lv_namestring = lo_session->get_securityconfiguration( ).
    lv_glueversionstring = lo_session->get_glueversion( ).
    lv_nullableinteger = lo_session->get_numberofworkers( ).
    lv_workertype = lo_session->get_workertype( ).
    lv_timestampvalue = lo_session->get_completedon( ).
    lv_nullabledouble = lo_session->get_executiontime( ).
    lv_nullabledouble = lo_session->get_dpuseconds( ).
    lv_idletimeout = lo_session->get_idletimeout( ).
    lv_namestring = lo_session->get_profilename( ).
  ENDIF.
ENDIF.