Skip to content

/AWS1/IF_DOA=>LISTBACKLOGTASKS()

About ListBacklogTasks

Lists backlog tasks in the specified agent space with optional filtering and sorting

Method Signature

METHODS /AWS1/IF_DOA~LISTBACKLOGTASKS
  IMPORTING
    !IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
    !IO_FILTER TYPE REF TO /AWS1/CL_DOATASKFILTER OPTIONAL
    !IV_LIMIT TYPE /AWS1/DOAINTEGER OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/DOANEXTTOKEN OPTIONAL
    !IV_SORTFIELD TYPE /AWS1/DOATASKSORTFIELD OPTIONAL
    !IV_ORDER TYPE /AWS1/DOATASKSORTORDER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doalstbacklogtasksrsp
  RAISING
    /AWS1/CX_DOAACCESSDENIEDEX
    /AWS1/CX_DOACONFLICTEXCEPTION
    /AWS1/CX_DOACONTENTSIZEEXCDEX
    /AWS1/CX_DOAINTERNALSERVEREX
    /AWS1/CX_DOAINVALIDPARAMETEREX
    /AWS1/CX_DOARESOURCENOTFOUNDEX
    /AWS1/CX_DOASERVICEQUOTAEXCDEX
    /AWS1/CX_DOATHROTTLINGEX
    /AWS1/CX_DOAVLDTNEXCEPTION
    /AWS1/CX_DOACLIENTEXC
    /AWS1/CX_DOASERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_agentspaceid TYPE /AWS1/DOAAGENTSPACEID /AWS1/DOAAGENTSPACEID

The unique identifier for the agent space containing the tasks

Optional arguments:

io_filter TYPE REF TO /AWS1/CL_DOATASKFILTER /AWS1/CL_DOATASKFILTER

Filter criteria to apply when listing tasks

Filtering restrictions: - Each filter field list is limited to a single value - Filtering by Priority and Status at the same time when not filtering by Type is not permitted - Timestamp filters (createdAfter, createdBefore) can be combined with other filters when not sorting by priority

iv_limit TYPE /AWS1/DOAINTEGER /AWS1/DOAINTEGER

Maximum number of tasks to return in a single response (1-1000, default: 100)

iv_nexttoken TYPE /AWS1/DOANEXTTOKEN /AWS1/DOANEXTTOKEN

Token for retrieving the next page of results

iv_sortfield TYPE /AWS1/DOATASKSORTFIELD /AWS1/DOATASKSORTFIELD

Field to sort by

Sorting restrictions: - Only sorting on createdAt is supported when using priority or status filters alone. - Sorting by priority is not supported when using Timestamp filters (createdAfter, createdBefore)

iv_order TYPE /AWS1/DOATASKSORTORDER /AWS1/DOATASKSORTORDER

Sort order for the tasks based on sortField (default: DESC)

RETURNING

oo_output TYPE REF TO /aws1/cl_doalstbacklogtasksrsp /AWS1/CL_DOALSTBACKLOGTASKSRSP

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->listbacklogtasks(
  io_filter = new /aws1/cl_doataskfilter(
    it_priority = VALUE /aws1/cl_doaprioritylist_w=>tt_prioritylist(
      ( new /aws1/cl_doaprioritylist_w( |string| ) )
    )
    it_status = VALUE /aws1/cl_doataskstatuslist_w=>tt_taskstatuslist(
      ( new /aws1/cl_doataskstatuslist_w( |string| ) )
    )
    it_tasktype = VALUE /aws1/cl_doatasktypelist_w=>tt_tasktypelist(
      ( new /aws1/cl_doatasktypelist_w( |string| ) )
    )
    iv_createdafter = '20150101000000.0000000'
    iv_createdbefore = '20150101000000.0000000'
    iv_primarytaskid = |string|
  )
  iv_agentspaceid = |string|
  iv_limit = 123
  iv_nexttoken = |string|
  iv_order = |string|
  iv_sortfield = |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_tasks( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_agentspaceid( ).
      lv_string = lo_row_1->get_taskid( ).
      lv_string = lo_row_1->get_executionid( ).
      lv_string = lo_row_1->get_title( ).
      lv_string = lo_row_1->get_description( ).
      lo_referenceoutput = lo_row_1->get_reference( ).
      IF lo_referenceoutput IS NOT INITIAL.
        lv_string = lo_referenceoutput->get_system( ).
        lv_string = lo_referenceoutput->get_title( ).
        lv_string = lo_referenceoutput->get_referenceid( ).
        lv_string = lo_referenceoutput->get_referenceurl( ).
        lv_string = lo_referenceoutput->get_associationid( ).
      ENDIF.
      lv_tasktype = lo_row_1->get_tasktype( ).
      lv_priority = lo_row_1->get_priority( ).
      lv_taskstatus = lo_row_1->get_status( ).
      lv_backlogtimestamp = lo_row_1->get_createdat( ).
      lv_backlogtimestamp = lo_row_1->get_updatedat( ).
      lv_integer = lo_row_1->get_version( ).
      lo_value = lo_row_1->get_supportmetadata( ).
      IF lo_value IS NOT INITIAL.
      ENDIF.
      lo_value = lo_row_1->get_metadata( ).
      IF lo_value IS NOT INITIAL.
      ENDIF.
      lv_string = lo_row_1->get_primarytaskid( ).
      lv_string = lo_row_1->get_statusreason( ).
      lv_boolean = lo_row_1->get_haslinkedtasks( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.