Skip to content

/AWS1/IF_OMX=>STARTRUNBATCH()

About StartRunBatch

Starts a batch of workflow runs. You can group up to 100,000 runs into a single batch that share a common configuration defined in defaultRunSetting. Per-run overrides can be provided either inline via inlineSettings (up to 100 runs) or via a JSON file stored in Amazon S3 via s3UriSettings (up to 100,000 runs).

StartRunBatch validates common fields synchronously and returns immediately with a batch ID and status PENDING. Runs are submitted gradually and asynchronously at a rate governed by your StartRun throughput quota.

Method Signature

METHODS /AWS1/IF_OMX~STARTRUNBATCH
  IMPORTING
    !IV_BATCHNAME TYPE /AWS1/OMXBATCHNAME OPTIONAL
    !IV_REQUESTID TYPE /AWS1/OMXBATCHREQUESTID OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_OMXTAGMAP_W=>TT_TAGMAP OPTIONAL
    !IO_DEFAULTRUNSETTING TYPE REF TO /AWS1/CL_OMXDEFAULTRUNSETTING OPTIONAL
    !IO_BATCHRUNSETTINGS TYPE REF TO /AWS1/CL_OMXBATCHRUNSETTINGS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_omxstartrunbatchrsp
  RAISING
    /AWS1/CX_OMXACCESSDENIEDEX
    /AWS1/CX_OMXCONFLICTEXCEPTION
    /AWS1/CX_OMXINTERNALSERVEREX
    /AWS1/CX_OMXREQUESTTIMEOUTEX
    /AWS1/CX_OMXRESOURCENOTFOUNDEX
    /AWS1/CX_OMXSERVICEQUOTAEXCDEX
    /AWS1/CX_OMXTHROTTLINGEX
    /AWS1/CX_OMXVALIDATIONEX
    /AWS1/CX_OMXCLIENTEXC
    /AWS1/CX_OMXSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_requestid TYPE /AWS1/OMXBATCHREQUESTID /AWS1/OMXBATCHREQUESTID

A client token used to deduplicate retry requests and prevent duplicate batches from being created.

io_defaultrunsetting TYPE REF TO /AWS1/CL_OMXDEFAULTRUNSETTING /AWS1/CL_OMXDEFAULTRUNSETTING

Shared configuration applied to all runs in the batch. See DefaultRunSetting.

io_batchrunsettings TYPE REF TO /AWS1/CL_OMXBATCHRUNSETTINGS /AWS1/CL_OMXBATCHRUNSETTINGS

The individual run configurations. Specify exactly one of inlineSettings or s3UriSettings. See BatchRunSettings.

Optional arguments:

iv_batchname TYPE /AWS1/OMXBATCHNAME /AWS1/OMXBATCHNAME

An optional user-friendly name for the run batch.

it_tags TYPE /AWS1/CL_OMXTAGMAP_W=>TT_TAGMAP TT_TAGMAP

AWS tags to associate with the batch resource. These tags are not inherited by individual runs. To tag individual runs, use defaultRunSetting.runTags.

RETURNING

oo_output TYPE REF TO /aws1/cl_omxstartrunbatchrsp /AWS1/CL_OMXSTARTRUNBATCHRSP

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->startrunbatch(
  io_batchrunsettings = new /aws1/cl_omxbatchrunsettings(
    it_inlinesettings = VALUE /aws1/cl_omxinlinesetting=>tt_inlinesettings(
      (
        new /aws1/cl_omxinlinesetting(
          io_parameters = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
          it_runtags = VALUE /aws1/cl_omxtagmap_w=>tt_tagmap(
            (
              VALUE /aws1/cl_omxtagmap_w=>ts_tagmap_maprow(
                key = |string|
                value = new /aws1/cl_omxtagmap_w( |string| )
              )
            )
          )
          iv_name = |string|
          iv_outputbucketownerid = |string|
          iv_outputuri = |string|
          iv_priority = 123
          iv_runsettingid = |string|
        )
      )
    )
    iv_s3urisettings = |string|
  )
  io_defaultrunsetting = new /aws1/cl_omxdefaultrunsetting(
    io_parameters = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
    it_runtags = VALUE /aws1/cl_omxtagmap_w=>tt_tagmap(
      (
        VALUE /aws1/cl_omxtagmap_w=>ts_tagmap_maprow(
          key = |string|
          value = new /aws1/cl_omxtagmap_w( |string| )
        )
      )
    )
    iv_cachebehavior = |string|
    iv_cacheid = |string|
    iv_loglevel = |string|
    iv_name = |string|
    iv_outputbucketownerid = |string|
    iv_outputuri = |string|
    iv_priority = 123
    iv_retentionmode = |string|
    iv_rolearn = |string|
    iv_rungroupid = |string|
    iv_storagecapacity = 123
    iv_storagetype = |string|
    iv_workflowid = |string|
    iv_workflowownerid = |string|
    iv_workflowtype = |string|
    iv_workflowversionname = |string|
  )
  it_tags = VALUE /aws1/cl_omxtagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_omxtagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_omxtagmap_w( |string| )
      )
    )
  )
  iv_batchname = |string|
  iv_requestid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_batchid = lo_result->get_id( ).
  lv_batcharn = lo_result->get_arn( ).
  lv_batchstatus = lo_result->get_status( ).
  lv_batchuuid = lo_result->get_uuid( ).
  LOOP AT lo_result->get_tags( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
      lv_tagvalue = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.