Skip to content

/AWS1/IF_MWS=>GETWORKFLOWRUN()

About GetWorkflowRun

Retrieves detailed information about a specific workflow run, including its status, execution details, and task instances.

Method Signature

METHODS /AWS1/IF_MWS~GETWORKFLOWRUN
  IMPORTING
    !IV_WORKFLOWARN TYPE /AWS1/MWSWORKFLOWARN OPTIONAL
    !IV_RUNID TYPE /AWS1/MWSIDSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mwsgetworkflowrunrsp
  RAISING
    /AWS1/CX_MWSACCESSDENIEDEX
    /AWS1/CX_MWSINTERNALSERVEREX
    /AWS1/CX_MWSOPERATIONTIMEOUTEX
    /AWS1/CX_MWSRESOURCENOTFOUNDEX
    /AWS1/CX_MWSTHROTTLINGEX
    /AWS1/CX_MWSVALIDATIONEX
    /AWS1/CX_MWSCLIENTEXC
    /AWS1/CX_MWSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_workflowarn TYPE /AWS1/MWSWORKFLOWARN /AWS1/MWSWORKFLOWARN

The Amazon Resource Name (ARN) of the workflow that contains the run.

iv_runid TYPE /AWS1/MWSIDSTRING /AWS1/MWSIDSTRING

The unique identifier of the workflow run to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_mwsgetworkflowrunrsp /AWS1/CL_MWSGETWORKFLOWRUNRSP

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->getworkflowrun(
  iv_runid = |string|
  iv_workflowarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_workflowarn = lo_result->get_workflowarn( ).
  lv_versionid = lo_result->get_workflowversion( ).
  lv_idstring = lo_result->get_runid( ).
  lv_runtype = lo_result->get_runtype( ).
  LOOP AT lo_result->get_overrideparameters( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
    ENDIF.
  ENDLOOP.
  lo_workflowrundetail = lo_result->get_rundetail( ).
  IF lo_workflowrundetail IS NOT INITIAL.
    lv_workflowarn = lo_workflowrundetail->get_workflowarn( ).
    lv_versionid = lo_workflowrundetail->get_workflowversion( ).
    lv_idstring = lo_workflowrundetail->get_runid( ).
    lv_runtype = lo_workflowrundetail->get_runtype( ).
    lv_timestampvalue = lo_workflowrundetail->get_startedon( ).
    lv_timestampvalue = lo_workflowrundetail->get_createdat( ).
    lv_timestampvalue = lo_workflowrundetail->get_completedon( ).
    lv_timestampvalue = lo_workflowrundetail->get_modifiedat( ).
    lv_integer = lo_workflowrundetail->get_duration( ).
    lv_genericstring = lo_workflowrundetail->get_errormessage( ).
    LOOP AT lo_workflowrundetail->get_taskinstances( ) into lo_row_1.
      lo_row_2 = lo_row_1.
      IF lo_row_2 IS NOT INITIAL.
        lv_idstring = lo_row_2->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_workflowrunstatus = lo_workflowrundetail->get_runstate( ).
  ENDIF.
ENDIF.