취소 토큰을 기반으로 들어오는 대화에 대한 알림을 취소합니다.
Syntax
Microsoft.CIFramework.cancelEvent(cancellationToken, correlationId).then(successCallback, errorCallback);
매개 변수
| 이름 | 유형 | 필수 | Description |
|---|---|---|---|
| 취소토큰 | String | Yes | 들어오는 대화에 대한 알림을 표시하기 위해 메서드에 notifyEvent 제공된 고유한 문자열입니다. |
| correlationId | GUID | 아니오 | 진단 원격 분석을 위해 모든 관련 API 호출을 함께 그룹화하는 데 사용됩니다. |
| success콜백 | 기능 | 아니오 | 요청이 성공할 때 호출하는 함수입니다. 콜백이 성공하면 응답 개체에 취소 토큰이 포함됩니다. |
| error콜백 | 기능 | 아니오 | 요청이 실패할 때 호출할 함수입니다. |
콜백 함수 세부 정보
다음 개체는 및 successCallbackerrorCallback 함수에 전달됩니다.
successCallback 함수
취소 토큰을 반환합니다.
errorCallback 함수
샘플 JSON 개체:
{
"message" : "<error details>",
"msdyn_name" : "CancelEvent"
}
매개 변수
| message | Description |
|---|---|
| RejectAfterClientError | 알 수 없는 예외가 발생했습니다(Platform API 호출이 실패하거나 일부 입력 매개 변수가 누락된 경우 발생). |
Example
// Trying to cancel a notification, use the same cancelToken passed during creation of notification in notifyEvent
Microsoft.CIFramework.cancelEvent(CancelToken).then(
function success(result) {
console.log(result);
// Perform operations
},
function (error) {
console.log(error.message);
// Handle error conditions
}
);