[CMDB IRE] ペイロードを使用してCI 識別をオンデマンドで実行する方法Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } ペイロードとバックグラウンドスクリプトを使用して、識別および調整エンジン (IRE) を通じた CI 処理をデバッグするために、構成アイテム (CI) の識別と調整をオンデマンドで実行します。 Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } サポートされているすべてのリリース Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } CI 識別をオンデマンドで実行する前に、IRE(または createOrUpdateCI() API)に送信される CI ペイロードが必要です。ペイロードをお持ちでない場合は、How to capture IRE debug logs を参照してください。 ペイロードが用意できたら、次のいずれかの方法を使用できます。 IRE シミュレーター — データベースへの変更を加えずに、CI の識別と調整をシミュレートします。バックグラウンドスクリプト — CI の識別と調整を実行し、ターゲットレコードに変更をコミットします。データベースのコミット中に発生する問題をデバッグする場合はこの方法を使用してください。 バックグラウンドスクリプトを使用して CI 識別を実行する。 [System Definition] > [Scripts - Background] に移動します。ペイロードを準備します。サンプルペイロードは次のようになります。 var payload = { items: [{ className:'<<CLASS_NAME>>', values: { name: '<<CI_NAME>>', serial_number:'<<CIs_Serial_NUMBER>>' } }] }; 次のスクリプトのプレースホルダー変数を置き換えてから実行します。 YOUR_COPIED_CI_PAYLOAD — 事前準備の手順で取得したペイロード、またはご自身で生成したペイロード。YOUR_DATA_SOURCE — ServiceNow、SCCM、ImportSet など、使用するデータソース。 runCiIdentificationReconciliation(); function runCiIdentificationReconciliation() { var payload = YOUR_COPIED_CI_PAYLOAD; var input = new JSON().encode(payload); var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCIEnhanced('YOUR_DATA_SOURCE', input,{}); // If you dont wanted to use the Enhanced IRE engine you can replace the above line with below: // var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCI('YOUR_DATA_SOURCE', input); gs.print(output); } IRE error messages に記載されているエラーコードを使用して出力を分析します。 Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } How to capture IRE debug logsIRE messagesHow the CMDB Identification and Reconciliation Engine works when passing a CI (as payload) to the createOrUpdateCI()