---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideFlow - 클라이언트

# GlideFlow - 클라이언트 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 10분

GlideFlow API는 작업, 플로우 및 하위 플로우와의 클라이언트 측 상호작용을 위한 메서드를 제공합니다.  
클라이언트 스크립트를 허용하는 클래식 ServiceNow AI Platform UI 환경에서 이 API를 사용할 수 있습니다. 작업, 플로우 또는 하위 플로우는 클라이언트 호출 가능으로 설정되어야 하며 의 워크플로우 스튜디오보안 관리 기능을 사용하는 유효한 ACL이 있어야 합니다.  
주:  
이 APi는 UI와 작업 공간 경험 호환되지 않습니다.

GlideFlow API 내의 일부 메서드는 `promise` 객체를 반환합니다. `promise`는 비동기 작업의 최종 결과를 나타냅니다. promise에 대한 자세한 내용은 [Promise - Javascript MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) 또는 [AngularJS 설명서를 참조하세요.](https://docs.angularjs.org/api/ng/service/$q)  
이 API를 사용하여 다음을 수행할 수 있습니다.

* 스크립트를 통해 작업, 플로우 또는 하위 플로우를 시작합니다.
* 기존 실행을 가져옵니다.
* 상태와 사용 가능한 출력을 가져옵니다.
* 작업, 플로우 또는 하위 플로우가 완료될 때까지 대기합니다.
{#GlideFlowAPI__ul_bdk_tf2_xs}

GlideFlow API에 대한 생성자가 없습니다. `GlideFlow` 전역 객체를 사용하여 GlideFlow 메서드에 액세스합니다.

## GlideFlow - execution.awaitCompletion() {#ariaid-title2}

실행에 대한 완료 객체를 반환합니다.
{#execution-awaitCompletion__table_bqv_1q2_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 1. 매개변수]

{#execution-awaitCompletion__table_bqv_1q2_ffb} {#execution-awaitCompletion__table_cqv_1q2_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 플로우 또는 작업 실행에 대한 완료 상세 정보를 포함하는 객체입니다. |
[표 2. 반환]

{#execution-awaitCompletion__table_cqv_1q2_ffb}  
이 예에서 작업은 실행 객체를 반환하는 startAction()을 사용하여 실행됩니다. 그런 다음 코드는 완료 객체를 반환하는 이 실행 객체에 awaitCompletion()을 사용합니다. 코드는 이 완성 개체를 사용하여 실행 내의 상태 및 출력을 기록합니다.


    (function() {
    	var inputs = {};

    	inputs['input1'] = 'string input'; // String

    	GlideFlow.startAction('global.action_name', inputs)
    		.then(function(execution) {
    			return execution.awaitCompletion();
    		}, errorResolver)
    		.then(function(completion) {
    			var status = completion.status;
    			console.log(status);

    			// Available Outputs:
    			var outputs = completion.outputs;
    			console.log(outputs);
    		}, errorResolver());

    	function errorResolver(error) {
    		// Handle errors in error resolver
    		console.error(error);
    	}
    })();

## GlideFlow - execution.getExecutionStatus() {#ariaid-title3}

현재 실행의 실행 상태가 포함된 문자열을 반환합니다.
{#execution-getExecutionStatus__table_utm_jp2_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 3. 매개변수]

{#execution-getExecutionStatus__table_utm_jp2_ffb} {#execution-getExecutionStatus__table_vtm_jp2_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | 실행 상태를 포함하는 문자열입니다. |
[표 4. 반환]

{#execution-getExecutionStatus__table_vtm_jp2_ffb}  
이 예제에서 코드는 getExecution 메서드를 사용하여 실행 객체를 가져옵니다. getExecution 메서드에는 실행을 시작하는 데 사용되는 메서드에서 반환하는 ID가 필요합니다. 그런 다음 코드는 getExecutionStatus()를 사용하여 계속하기 전에 실행이 완료되었는지 확인합니다.


    // Get an existing action, getStatus, and getOutputs if complete
    (function() {
       GlideFlow.getExecution('mamIN4Q35vmEFe744EwJV5GHrSz8fmJG')
          .then(function(execution) {
             execution.getExecutionStatus().then(
                function(status) {
                   if (status === 'COMPLETE')
                      execution.getOutputs().then(
                         function(outputs) {
                            console.log(outputs);
                         },
                         errorResolver
                      );
                },
                errorResolver
             );
          }, errorResolver);

       function errorResolver(error) {
          // Handle errors in error resolver
          console.error(error);
       }
    })();

## GlideFlow - execution.getOutputs() {#ariaid-title4}

실행을 위한 출력 객체를 반환합니다.
이 방법을 사용하여 작업, 플로우 또는 하위 플로우의 실행으로 생성된 출력에 액세스합니다.
{#execution-getOutputs__table_jsw_f42_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 5. 매개변수]

{#execution-getOutputs__table_jsw_f42_ffb} {#execution-getOutputs__table_ksw_f42_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 작업, 플로우 또는 하위 플로우에 대한 출력을 포함하는 객체입니다. |
[표 6. 반환]

{#execution-getOutputs__table_ksw_f42_ffb}  
이 예제에서 코드는 getExecution 메서드를 사용하여 실행 객체를 가져옵니다. 실행이 완료되면 코드는 getOutputs()를 사용하여 outputs 객체를 반환한 다음 console.log 메서드를 사용하여 기록합니다.


    // Get an existing action, getStatus, and getOutputs if complete
    (function() {
       GlideFlow.getExecution('mamIN4Q35vmEFe744EwJV5GHrSz8fmJG')
          .then(function(execution) {
             execution.getExecutionStatus().then(
                function(status) {
                   if (status === 'COMPLETE')
                      execution.getOutputs().then(
                         function(outputs) {
                            console.log(outputs);
                         },
                         errorResolver
                      );
                },
                errorResolver
             );
          }, errorResolver);

       function errorResolver(error) {
          // Handle errors in error resolver
          console.error(error);
       }
    })();

## GlideFlow - getExecution(문자열 executionId) {#ariaid-title5}

ID로 기존 실행 인스턴스를 가져옵니다.
{#GlideFlow-getExecution__table_hpx_tqd_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| executionId | 문자열 | 검색할 실행의 ID입니다. |
[표 7. 매개변수]

{#GlideFlow-getExecution__table_hpx_tqd_ffb} {#GlideFlow-getExecution__table_ipx_tqd_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 실행 객체의 약속입니다. |
[표 8. 반환]

{#GlideFlow-getExecution__table_ipx_tqd_ffb}  
이 예제에서 코드는 실행을 가져온 다음 실행이 완료될 때까지 기다렸다가 console.log 사용하여 실행 완료 상태 및 출력을 기록합니다.


    // Get an existing action and await completion
    (function() {
    	GlideFlow.getExecution('79cd437e0b202300a150a95e93673ae3')
    		.then(function(execution) {
    			return execution.awaitCompletion();
    		}, errorResolver)
    		.then(function(completion) {

    			var status = completion.status;
    			console.log(status);

    			// Available Outputs:
    			var outputs = completion.outputs;
    			console.log(outputs);
    		}, errorResolver());

    	function errorResolver(error) {
    		// Handle errors in error resolver
    		console.error(error);
    	}
    })();

## GlideFlow - startAction(String scopedName.actionName, Map inputs) {#ariaid-title6}

작업을 시작합니다.
{#GlideFlow-startAction__table_q1w_r4d_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| scopedName | 문자열 | 실행할 플로우의 범위가 지정된 이름입니다. |
| 입력 | 객체 | 작업에 대해 정의된 입력을 포함하는 객체입니다. |
[표 9. 매개변수]

{#GlideFlow-startAction__table_q1w_r4d_ffb} {#GlideFlow-startAction__table_r1w_r4d_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 작업 실행에 대한 상세 정보를 포함하는 객체입니다. |
[표 10. 반환]

{#GlideFlow-startAction__table_r1w_r4d_ffb}  
이 예시에서 코드는 inputs 입력 객체 변수의 인수를 사용하여 전역 action_name 작업을 시작합니다. 완료되면 이 예시에서는 console.log 또는 console.error를 사용하여 플로우의 성공 또는 실패를 보고합니다.


    // Start an action and await completion.
    (function() {
    	var inputs = {};

    	inputs['input1'] = 'string input'; // String

    	GlideFlow.startAction('global.action_name', inputs)
    		.then(function(execution) {
    			return execution.awaitCompletion();
    		}, errorResolver)
    		.then(function(completion) {
    			var status = completion.status;
    			console.log(status);

    			// Available Outputs:
    			var outputs = completion.outputs;
    			console.log(outputs);
    		}, errorResolver());

    	function errorResolver(error) {
    		// Handle errors in error resolver
    		console.error(error);
    	}
    })();

## GlideFlow - startFlow(String scopedName.flowName, Map inputs) {#ariaid-title7}

플로우를 시작합니다.
{#GlideFlow-startFlow__table_jl5_xqc_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| scopedName | 문자열 | 실행할 플로우의 범위가 지정된 이름입니다. |
| 입력 | 객체 | 플로우에 대해 정의된 입력을 포함하는 객체입니다. |
[표 11. 매개변수]

{#GlideFlow-startFlow__table_jl5_xqc_ffb} {#GlideFlow-startFlow__table_kl5_xqc_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 플로우 실행에 대한 상세 정보를 포함하는 객체입니다. |
[표 12. 반환]

{#GlideFlow-startFlow__table_kl5_xqc_ffb}  
이 예시 플로우는 일반적으로 인시던트 테이블의 기록이 업데이트될 때 트리거됩니다. 클라이언트 스크립트에서 플로우를 활성화하기 때문에 이 정보를 제공해야 합니다. 코드는 현재 기록과 기록 테이블을 포함하는 입력 변수를 생성합니다.


    // Start a Flow
    (function() {
          var inputs = {};
          inputs['current'] = { // GlideRecord 
            table : 'incident', 
            sys_id : '79cd437e0b202300a150a95e93673ae3'  
        };
            inputs['table_name'] = 'incident';
             GlideFlow.startFlow('global.flow_name', inputs)
    		.then(
    			function(execution) {
    				console.log('Started flow_name with execution id :' + execution.getExecutionId());
    			},
    			function(error) {
    				console.log('Unable to start flow: ' + error);
    			}
    		);
    })();

## GlideFlow - startSubflow(String scopedName.subflowName, Map inputs) {#ariaid-title8}

하위 플로우를 시작합니다.
{#GlideFlow-startSubflow__table_ftt_5pd_ffb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| scopedName | 문자열 | 실행할 플로우의 범위가 지정된 이름입니다. |
| 입력 | 객체 | 하위 흐름에 사용되는 입력을 포함하는 객체입니다. |
[표 13. 매개변수]

{#GlideFlow-startSubflow__table_ftt_5pd_ffb} {#GlideFlow-startSubflow__table_gtt_5pd_ffb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 하위 플로우 실행에 대한 상세 정보를 포함하는 객체입니다. |
[표 14. 반환]

{#GlideFlow-startSubflow__table_gtt_5pd_ffb}  
이 예시에서 코드는 inputs 배열 변수의 인수를 사용하여 전역 subflow_name 하위 플로우를 시작합니다. 완료되면 이 예시에서는 console.log 또는 console.error를 사용하여 플로우의 성공 또는 실패를 보고합니다.


    // Start an action and await completion.
    (function() {
    	var inputs = {};

    	inputs['input1'] = 'string input'; // String

    	GlideFlow.startSubflow('global.subflow_name', inputs)
    		.then(function(execution) {
    			return execution.awaitCompletion();
    		}, errorResolver)
    		.then(function(completion) {
    			var status = completion.status;
    			console.log(status);

    			// Available Outputs:
    			var outputs = completion.outputs;
    			console.log(outputs);
    		}, errorResolver());

    	function errorResolver(error) {
    		// Handle errors in error resolver
    		console.error(error);
    	}
    })();


