Skip to content

/AWS1/CL_PIP=>GETPIPELINESTATE()

About GetPipelineState

Returns information about the state of a pipeline, including the stages and actions.

Values returned in the revisionId and revisionUrl fields indicate the source revision information, such as the commit ID, for the current state.

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/PIPPIPELINENAME /AWS1/PIPPIPELINENAME

The name of the pipeline about which you want to get information.

RETURNING

oo_output TYPE REF TO /aws1/cl_pipgetplinstateoutput /AWS1/CL_PIPGETPLINSTATEOUTPUT

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->/aws1/if_pip~getpipelinestate( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_pipelinename = lo_result->get_pipelinename( ).
  lv_pipelineversion = lo_result->get_pipelineversion( ).
  LOOP AT lo_result->get_stagestates( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_stagename = lo_row_1->get_stagename( ).
      lo_stageexecution = lo_row_1->get_inboundexecution( ).
      IF lo_stageexecution IS NOT INITIAL.
        lv_pipelineexecutionid = lo_stageexecution->get_pipelineexecutionid( ).
        lv_stageexecutionstatus = lo_stageexecution->get_status( ).
        lv_executiontype = lo_stageexecution->get_type( ).
      ENDIF.
      LOOP AT lo_row_1->get_inboundexecutions( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_pipelineexecutionid = lo_row_3->get_pipelineexecutionid( ).
          lv_stageexecutionstatus = lo_row_3->get_status( ).
          lv_executiontype = lo_row_3->get_type( ).
        ENDIF.
      ENDLOOP.
      lo_transitionstate = lo_row_1->get_inboundtransitionstate( ).
      IF lo_transitionstate IS NOT INITIAL.
        lv_enabled = lo_transitionstate->get_enabled( ).
        lv_lastchangedby = lo_transitionstate->get_lastchangedby( ).
        lv_lastchangedat = lo_transitionstate->get_lastchangedat( ).
        lv_disabledreason = lo_transitionstate->get_disabledreason( ).
      ENDIF.
      LOOP AT lo_row_1->get_actionstates( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_actionname = lo_row_5->get_actionname( ).
          lo_actionrevision = lo_row_5->get_currentrevision( ).
          IF lo_actionrevision IS NOT INITIAL.
            lv_revision = lo_actionrevision->get_revisionid( ).
            lv_revisionchangeidentifie = lo_actionrevision->get_revisionchangeid( ).
            lv_timestamp = lo_actionrevision->get_created( ).
          ENDIF.
          lo_actionexecution = lo_row_5->get_latestexecution( ).
          IF lo_actionexecution IS NOT INITIAL.
            lv_actionexecutionid = lo_actionexecution->get_actionexecutionid( ).
            lv_actionexecutionstatus = lo_actionexecution->get_status( ).
            lv_executionsummary = lo_actionexecution->get_summary( ).
            lv_timestamp = lo_actionexecution->get_laststatuschange( ).
            lv_actionexecutiontoken = lo_actionexecution->get_token( ).
            lv_lastupdatedby = lo_actionexecution->get_lastupdatedby( ).
            lv_executionid = lo_actionexecution->get_externalexecutionid( ).
            lv_url = lo_actionexecution->get_externalexecutionurl( ).
            lv_percentage = lo_actionexecution->get_percentcomplete( ).
            lo_errordetails = lo_actionexecution->get_errordetails( ).
            IF lo_errordetails IS NOT INITIAL.
              lv_code = lo_errordetails->get_code( ).
              lv_message = lo_errordetails->get_message( ).
            ENDIF.
            lv_logstreamarn = lo_actionexecution->get_logstreamarn( ).
          ENDIF.
          lv_url = lo_row_5->get_entityurl( ).
          lv_url = lo_row_5->get_revisionurl( ).
        ENDIF.
      ENDLOOP.
      lo_stageexecution = lo_row_1->get_latestexecution( ).
      IF lo_stageexecution IS NOT INITIAL.
        lv_pipelineexecutionid = lo_stageexecution->get_pipelineexecutionid( ).
        lv_stageexecutionstatus = lo_stageexecution->get_status( ).
        lv_executiontype = lo_stageexecution->get_type( ).
      ENDIF.
      lo_stageconditionstate = lo_row_1->get_beforeentrycondstate( ).
      IF lo_stageconditionstate IS NOT INITIAL.
        lo_stageconditionsexecutio = lo_stageconditionstate->get_latestexecution( ).
        IF lo_stageconditionsexecutio IS NOT INITIAL.
          lv_conditionexecutionstatu = lo_stageconditionsexecutio->get_status( ).
          lv_executionsummary = lo_stageconditionsexecutio->get_summary( ).
        ENDIF.
        LOOP AT lo_stageconditionstate->get_conditionstates( ) into lo_row_6.
          lo_row_7 = lo_row_6.
          IF lo_row_7 IS NOT INITIAL.
            lo_conditionexecution = lo_row_7->get_latestexecution( ).
            IF lo_conditionexecution IS NOT INITIAL.
              lv_conditionexecutionstatu = lo_conditionexecution->get_status( ).
              lv_executionsummary = lo_conditionexecution->get_summary( ).
              lv_timestamp = lo_conditionexecution->get_laststatuschange( ).
            ENDIF.
            LOOP AT lo_row_7->get_rulestates( ) into lo_row_8.
              lo_row_9 = lo_row_8.
              IF lo_row_9 IS NOT INITIAL.
                lv_rulename = lo_row_9->get_rulename( ).
                lo_rulerevision = lo_row_9->get_currentrevision( ).
                IF lo_rulerevision IS NOT INITIAL.
                  lv_revision = lo_rulerevision->get_revisionid( ).
                  lv_revisionchangeidentifie = lo_rulerevision->get_revisionchangeid( ).
                  lv_timestamp = lo_rulerevision->get_created( ).
                ENDIF.
                lo_ruleexecution = lo_row_9->get_latestexecution( ).
                IF lo_ruleexecution IS NOT INITIAL.
                  lv_ruleexecutionid = lo_ruleexecution->get_ruleexecutionid( ).
                  lv_ruleexecutionstatus = lo_ruleexecution->get_status( ).
                  lv_executionsummary = lo_ruleexecution->get_summary( ).
                  lv_timestamp = lo_ruleexecution->get_laststatuschange( ).
                  lv_ruleexecutiontoken = lo_ruleexecution->get_token( ).
                  lv_lastupdatedby = lo_ruleexecution->get_lastupdatedby( ).
                  lv_executionid = lo_ruleexecution->get_externalexecutionid( ).
                  lv_url = lo_ruleexecution->get_externalexecutionurl( ).
                  lo_errordetails = lo_ruleexecution->get_errordetails( ).
                  IF lo_errordetails IS NOT INITIAL.
                    lv_code = lo_errordetails->get_code( ).
                    lv_message = lo_errordetails->get_message( ).
                  ENDIF.
                ENDIF.
                lv_url = lo_row_9->get_entityurl( ).
                lv_url = lo_row_9->get_revisionurl( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_stageconditionstate = lo_row_1->get_onsuccessconditionstate( ).
      IF lo_stageconditionstate IS NOT INITIAL.
        lo_stageconditionsexecutio = lo_stageconditionstate->get_latestexecution( ).
        IF lo_stageconditionsexecutio IS NOT INITIAL.
          lv_conditionexecutionstatu = lo_stageconditionsexecutio->get_status( ).
          lv_executionsummary = lo_stageconditionsexecutio->get_summary( ).
        ENDIF.
        LOOP AT lo_stageconditionstate->get_conditionstates( ) into lo_row_6.
          lo_row_7 = lo_row_6.
          IF lo_row_7 IS NOT INITIAL.
            lo_conditionexecution = lo_row_7->get_latestexecution( ).
            IF lo_conditionexecution IS NOT INITIAL.
              lv_conditionexecutionstatu = lo_conditionexecution->get_status( ).
              lv_executionsummary = lo_conditionexecution->get_summary( ).
              lv_timestamp = lo_conditionexecution->get_laststatuschange( ).
            ENDIF.
            LOOP AT lo_row_7->get_rulestates( ) into lo_row_8.
              lo_row_9 = lo_row_8.
              IF lo_row_9 IS NOT INITIAL.
                lv_rulename = lo_row_9->get_rulename( ).
                lo_rulerevision = lo_row_9->get_currentrevision( ).
                IF lo_rulerevision IS NOT INITIAL.
                  lv_revision = lo_rulerevision->get_revisionid( ).
                  lv_revisionchangeidentifie = lo_rulerevision->get_revisionchangeid( ).
                  lv_timestamp = lo_rulerevision->get_created( ).
                ENDIF.
                lo_ruleexecution = lo_row_9->get_latestexecution( ).
                IF lo_ruleexecution IS NOT INITIAL.
                  lv_ruleexecutionid = lo_ruleexecution->get_ruleexecutionid( ).
                  lv_ruleexecutionstatus = lo_ruleexecution->get_status( ).
                  lv_executionsummary = lo_ruleexecution->get_summary( ).
                  lv_timestamp = lo_ruleexecution->get_laststatuschange( ).
                  lv_ruleexecutiontoken = lo_ruleexecution->get_token( ).
                  lv_lastupdatedby = lo_ruleexecution->get_lastupdatedby( ).
                  lv_executionid = lo_ruleexecution->get_externalexecutionid( ).
                  lv_url = lo_ruleexecution->get_externalexecutionurl( ).
                  lo_errordetails = lo_ruleexecution->get_errordetails( ).
                  IF lo_errordetails IS NOT INITIAL.
                    lv_code = lo_errordetails->get_code( ).
                    lv_message = lo_errordetails->get_message( ).
                  ENDIF.
                ENDIF.
                lv_url = lo_row_9->get_entityurl( ).
                lv_url = lo_row_9->get_revisionurl( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_stageconditionstate = lo_row_1->get_onfailureconditionstate( ).
      IF lo_stageconditionstate IS NOT INITIAL.
        lo_stageconditionsexecutio = lo_stageconditionstate->get_latestexecution( ).
        IF lo_stageconditionsexecutio IS NOT INITIAL.
          lv_conditionexecutionstatu = lo_stageconditionsexecutio->get_status( ).
          lv_executionsummary = lo_stageconditionsexecutio->get_summary( ).
        ENDIF.
        LOOP AT lo_stageconditionstate->get_conditionstates( ) into lo_row_6.
          lo_row_7 = lo_row_6.
          IF lo_row_7 IS NOT INITIAL.
            lo_conditionexecution = lo_row_7->get_latestexecution( ).
            IF lo_conditionexecution IS NOT INITIAL.
              lv_conditionexecutionstatu = lo_conditionexecution->get_status( ).
              lv_executionsummary = lo_conditionexecution->get_summary( ).
              lv_timestamp = lo_conditionexecution->get_laststatuschange( ).
            ENDIF.
            LOOP AT lo_row_7->get_rulestates( ) into lo_row_8.
              lo_row_9 = lo_row_8.
              IF lo_row_9 IS NOT INITIAL.
                lv_rulename = lo_row_9->get_rulename( ).
                lo_rulerevision = lo_row_9->get_currentrevision( ).
                IF lo_rulerevision IS NOT INITIAL.
                  lv_revision = lo_rulerevision->get_revisionid( ).
                  lv_revisionchangeidentifie = lo_rulerevision->get_revisionchangeid( ).
                  lv_timestamp = lo_rulerevision->get_created( ).
                ENDIF.
                lo_ruleexecution = lo_row_9->get_latestexecution( ).
                IF lo_ruleexecution IS NOT INITIAL.
                  lv_ruleexecutionid = lo_ruleexecution->get_ruleexecutionid( ).
                  lv_ruleexecutionstatus = lo_ruleexecution->get_status( ).
                  lv_executionsummary = lo_ruleexecution->get_summary( ).
                  lv_timestamp = lo_ruleexecution->get_laststatuschange( ).
                  lv_ruleexecutiontoken = lo_ruleexecution->get_token( ).
                  lv_lastupdatedby = lo_ruleexecution->get_lastupdatedby( ).
                  lv_executionid = lo_ruleexecution->get_externalexecutionid( ).
                  lv_url = lo_ruleexecution->get_externalexecutionurl( ).
                  lo_errordetails = lo_ruleexecution->get_errordetails( ).
                  IF lo_errordetails IS NOT INITIAL.
                    lv_code = lo_errordetails->get_code( ).
                    lv_message = lo_errordetails->get_message( ).
                  ENDIF.
                ENDIF.
                lv_url = lo_row_9->get_entityurl( ).
                lv_url = lo_row_9->get_revisionurl( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_retrystagemetadata = lo_row_1->get_retrystagemetadata( ).
      IF lo_retrystagemetadata IS NOT INITIAL.
        lv_retryattempt = lo_retrystagemetadata->get_autostageretryattempt( ).
        lv_retryattempt = lo_retrystagemetadata->get_manualstageretryattempt( ).
        lv_retrytrigger = lo_retrystagemetadata->get_latestretrytrigger( ).
      ENDIF.
    ENDIF.
  ENDLOOP.
  lv_timestamp = lo_result->get_created( ).
  lv_timestamp = lo_result->get_updated( ).
ENDIF.