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

 Release :

    - xanadu

ft:locale :

    - ko-KR

ft:publication_title :

    - Xanadu API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# ServiceNow Fluent

# ServiceNow Fluent {#ariaid-title1}

* 릴리스 버전: Xanadu
* 
* 업데이트 날짜 2024년 08월 01일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 4분

도메인별 프로그래밍 언어를 사용하여 소스 코드에서 애플리케이션 메타데이터를 ServiceNow Fluent 정의합니다.

## 개요 {#servicenow-fluent__section_jnb_vvg_z1c}

ServiceNow Fluent 는 애플리케이션을 구성하는 메타데이터 파일\[sys_metadata\]을 정의하기 위한 TypeScript를 기반으로 하는 DSL(도메인별 언어)이며 테이블, 역할, ACL, 비즈니스 규칙 및 Automated Test Framework 테스트와 같은 다양한 유형의 메타데이터에 대한 API를 포함합니다.

개발자는 양식 또는 작성기 도구 사용자 인터페이스를 통하지 않고 몇 줄의 코드로 이 메타데이터를 정의합니다. 로 ServiceNow IDE 만든 응용 프로그램 또는 ServiceNow SDK 에서 개발을 ServiceNow Fluent지원합니다.  
ServiceNow Fluent 는 메타데이터에 대한 변경 내용을 다른 Now Platform 사용자 인터페이스에서 소스 코드로 동기화하고 소스 코드에 대한 변경 내용을 인스턴스 전체의 메타데이터로 다시 동기화할 수 있는 양방향 동기화를 지원합니다.  
주:  
테스트 API는 Automated Test Framework 단방향 동기화만 지원합니다. 소스 코드에서 ATF 테스트를 정의한 후 메타데이터가 소스 코드 외부에서 수정되면 이러한 변경 내용이 동기화되지 않고 소스 코드에 반영되지 않습니다.

or 사용을 ServiceNow IDE 시작하려면 or [ServiceNow SDK](https://www.servicenow.com/docs/access?context=servicenow-sdk-landing&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US) 설명서를 참조하십시오[ServiceNow IDE](https://www.servicenow.com/docs/access?context=servicenow-ide-landing&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US).ServiceNow SDK

## API {#servicenow-fluent__section_nyj_y13_zbc}

ServiceNow Fluent 에는 다음과 같은 유형의 메타데이터에 대한 API가 포함되어 있습니다. Record API를 사용하여 전용 API가 없는 애플리케이션 메타데이터를 정의할 수 있습니다. API 및 예제에 대한 자세한 내용은 을 참조하십시오 [ServiceNow Fluent API reference](https://www.servicenow.com/docs/access?context=servicenow-fluent-api-reference&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US).

* 접근 제어 목록(ACL)
* 애플리케이션 메뉴
* Automated Test Framework 테스트
* 비즈니스 규칙
* 클라이언트 스크립트
* 목록
* 속성
* 기록
* 역할
* 스크립트 기반 REST API
* 테이블
{#servicenow-fluent__ul_cx1_db3_zbc}

## 사용량 {#servicenow-fluent__section_dgj_1b3_zbc}

.now.ts 확장명을 가진 파일에서 API의 ServiceNow Fluent 개체를 사용하여 응용 프로그램의 메타데이터를 정의합니다. @servicenow/sdk/core에서 API에 필요한 가져오기도 포함해야 합니다.  
다음 예시에는 애플리케이션의 테이블, 클라이언트 스크립트 및 비즈니스 규칙의 정의가 포함되어 있습니다. 비즈니스 규칙은 script.js JavaScript 모듈의 함수를 사용합니다.

    import '@servicenow/sdk/global'
    import { BusinessRule } from '@servicenow/sdk/core'
    import { ClientScript } from '@servicenow/sdk/core'
    import { Table, DateColumn, StringColumn } from '@servicenow/sdk/core'
    import { showStateUpdate } from '../server/script.js'

    //creates todo table, with three columns (deadline, status and task)
    export const x_snc_example_to_do = Table({
        name: 'x_snc_example_to_do',
        schema: {
            deadline: DateColumn({ label: 'deadline' }),
            state: StringColumn({
                label: 'State',
                choices: {
                    ready: { label: 'Ready' },
                    completed: { label: 'Completed' },
                    in_progress: { label: 'In Progress' },
                },
            }),
            task: StringColumn({ label: 'Task', maxLength: 120 }),
        },
    })

    //creates a client script that pops up 'Table loaded successfully!!' message everytime todo record is loaded
    ClientScript({
        $id: Now.ID['cs0'],
        name: 'my_client_script',
        table: 'x_snc_example_to_do',
        active: true,
        applies_extended: false,
        global: true,
        ui_type: 'all',
        description: 'Custom client script generated by Now SDK',
        messages: '',
        isolate_script: false,
        type: 'onLoad',
        script: script`function onLoad() {
            g_form.addInfoMessage("Table loaded successfully!!")
        }`,
    })

    //creates a business rule that pops up state change message whenever a todo record is updated
    BusinessRule({
        $id: Now.ID['br0'],
        action: ['update'],
        table: 'x_snc_example_to_do',
        script: showStateUpdate,
        name: 'LogStateChange',
        order: 100,
        when: 'after',
        active: true,
    })

애플리케이션을 빌드한 후 이 소스 코드는 인스턴스에 다음과 같은 애플리케이션 메타데이터 파일을 생성합니다.
그림 1. 코드에서 ServiceNow Fluent 생성된 애플리케이션 메타데이터
**관련 정보**   

* [Define application metadata in code with ServiceNow Fluent in the ServiceNow IDE](https://www.servicenow.com/docs/access?context=define-metadata-code-fluent-ide&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US)
* [Define application metadata in code with ServiceNow Fluent and the ServiceNow SDK](https://www.servicenow.com/docs/access?context=define-metadata-code-fluent-sdk&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US)

