Skip to content

/AWS1/IF_MWS=>LISTWORKFLOWS()

About ListWorkflows

Lists all workflows in your account, with optional pagination support. This operation returns summary information for workflows, showing only the most recently created version of each workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains workflow metadata in a highly available, distributed storage system that enables efficient querying and filtering. The service implements proper access controls to ensure you can only view workflows that you have permissions to access, supporting both individual and team-based workflow management scenarios.

Method Signature

METHODS /AWS1/IF_MWS~LISTWORKFLOWS
  IMPORTING
    !IV_MAXRESULTS TYPE /AWS1/MWSINTEGER OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/MWSSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mwslistworkflowsrsp
  RAISING
    /AWS1/CX_MWSACCESSDENIEDEX
    /AWS1/CX_MWSINTERNALSERVEREX
    /AWS1/CX_MWSOPERATIONTIMEOUTEX
    /AWS1/CX_MWSTHROTTLINGEX
    /AWS1/CX_MWSVALIDATIONEX
    /AWS1/CX_MWSCLIENTEXC
    /AWS1/CX_MWSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_maxresults TYPE /AWS1/MWSINTEGER /AWS1/MWSINTEGER

The maximum number of workflows you want to return in a single response.

iv_nexttoken TYPE /AWS1/MWSSTRING /AWS1/MWSSTRING

The pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to ListWorkflows.

RETURNING

oo_output TYPE REF TO /aws1/cl_mwslistworkflowsrsp /AWS1/CL_MWSLISTWORKFLOWSRSP

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->listworkflows(
  iv_maxresults = 123
  iv_nexttoken = |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_workflows( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_workflowarn = lo_row_1->get_workflowarn( ).
      lv_workflowversion = lo_row_1->get_workflowversion( ).
      lv_namestring = lo_row_1->get_name( ).
      lv_descriptionstring = lo_row_1->get_description( ).
      lv_timestampvalue = lo_row_1->get_createdat( ).
      lv_timestampvalue = lo_row_1->get_modifiedat( ).
      lv_workflowstatus = lo_row_1->get_workflowstatus( ).
      lv_genericstring = lo_row_1->get_triggermode( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.