Documentation index for AI agents

GS2-StateMachine 스크립트 트리거 레퍼런스

확장 스크립트를 호출하는 이벤트 트리거의 레퍼런스

트리거

start

동기 실행 스크립트

처리 전에, 스크립트가 동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
parametersstring스테이트 머신에 전달할 인자
Result
타입필수기본값값 제한설명
permitbool
시작을 허용할지 여부
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId
local parameters = args.parameters

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

비동기 실행 스크립트

처리 후에, 스크립트가 비동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
parametersstring스테이트 머신에 전달할 인자
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId
local parameters = args.parameters

-- 비동기 스크립트는 일반적으로 API 응답에 영향을 주지 않습니다.
-- 로그 출력이나 분석, 외부 알림 등에 사용됩니다.

result = {
}

pass

동기 실행 스크립트

처리 전에, 스크립트가 동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
Result
타입필수기본값값 제한설명
permitbool
스테이트 머신의 정상 종료를 허용할지 여부
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

비동기 실행 스크립트

처리 후에, 스크립트가 비동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId

-- 비동기 스크립트는 일반적으로 API 응답에 영향을 주지 않습니다.
-- 로그 출력이나 분석, 외부 알림 등에 사용됩니다.

result = {
}

error

동기 실행 스크립트

처리 전에, 스크립트가 동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
Result
타입필수기본값값 제한설명
permitbool
스테이트 머신의 비정상 종료를 허용할지 여부
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

비동기 실행 스크립트

처리 후에, 스크립트가 비동기 실행됩니다.

Request
타입설명
namespaceNamespace네임스페이스
stateMachineMasterStateMachineMaster스테이트 머신 마스터 데이터
statusStatus상태
userIdstring사용자 ID
구현 예제
-- Request
local namespace = args.namespace
local stateMachineMaster = args.stateMachineMaster
local status = args.status
local userId = args.userId

-- 비동기 스크립트는 일반적으로 API 응답에 영향을 주지 않습니다.
-- 로그 출력이나 분석, 외부 알림 등에 사용됩니다.

result = {
}