Skip to content

/AWS1/IF_SGM=>RENDERUITEMPLATE()

About RenderUiTemplate

Renders the UI template so that you can preview the worker's experience.

Method Signature

METHODS /AWS1/IF_SGM~RENDERUITEMPLATE
  IMPORTING
    !IO_UITEMPLATE TYPE REF TO /AWS1/CL_SGMUITEMPLATE OPTIONAL
    !IO_TASK TYPE REF TO /AWS1/CL_SGMRENDERABLETASK OPTIONAL
    !IV_ROLEARN TYPE /AWS1/SGMROLEARN OPTIONAL
    !IV_HUMANTASKUIARN TYPE /AWS1/SGMHUMANTASKUIARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmrenderuitmplrsp
  RAISING
    /AWS1/CX_SGMRESOURCENOTFOUND
    /AWS1/CX_SGMCLIENTEXC
    /AWS1/CX_SGMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

io_task TYPE REF TO /AWS1/CL_SGMRENDERABLETASK /AWS1/CL_SGMRENDERABLETASK

A RenderableTask object containing a representative task to render.

iv_rolearn TYPE /AWS1/SGMROLEARN /AWS1/SGMROLEARN

The Amazon Resource Name (ARN) that has access to the S3 objects that are used by the template.

Optional arguments:

io_uitemplate TYPE REF TO /AWS1/CL_SGMUITEMPLATE /AWS1/CL_SGMUITEMPLATE

A Template object containing the worker UI template to render.

iv_humantaskuiarn TYPE /AWS1/SGMHUMANTASKUIARN /AWS1/SGMHUMANTASKUIARN

The HumanTaskUiArn of the worker UI that you want to render. Do not provide a HumanTaskUiArn if you use the UiTemplate parameter.

See a list of available Human Ui Amazon Resource Names (ARNs) in UiConfig.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmrenderuitmplrsp /AWS1/CL_SGMRENDERUITMPLRSP

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->renderuitemplate(
  io_task = new /aws1/cl_sgmrenderabletask( |string| )
  io_uitemplate = new /aws1/cl_sgmuitemplate( |string| )
  iv_humantaskuiarn = |string|
  iv_rolearn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_string = lo_result->get_renderedcontent( ).
  LOOP AT lo_result->get_errors( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_code( ).
      lv_string = lo_row_1->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.