ITPAM process failed to trigger post upgrade from 4.3 to 4.4.
search cancel

ITPAM process failed to trigger post upgrade from 4.3 to 4.4.

book

Article ID: 371726

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

CA Catalog requests are not being processed in PAM, and Below error are being encountered.

Failed to execute code:
Process.FormData2 = convertJson( Process.FormData);
Process.FormData3 = convertValueToXml (Process.FormData2,'FormData3');
Wrapped java.lang.IllegalArgumentException: Illegal character in name: '11002'. (c2ojslib.js#1)

Environment

CA Service Management 17.4.
ITPAM 4.4 

Cause

Due regression issue with ITPAM 04.4 and due to a third party library change (which is used for convertValueToXML function) there is an issue with the process definition .  The fix for the same in the upcoming patch CP04 . 
However to address this issue currently on 4.4 Please use this below code which will not change any of the final data but will make the convertValueToXML function work.

Resolution

Please  add the bolded part below at the top in the failed RunJavaScript operator and then run the same usecase.

function addPrefix(formData){
 formData =JSON.parse( formData);
  var modifiedObject = {};

   for (var key in formData) {
       if (!isNaN(key.charAt(0))) {
           modifiedObject["prefixstr_" + key] = formData[key];
       } else {
           modifiedObject[key] = formData[key];
       }
   }
 return JSON.stringify(modifiedObject);
}


Process.FormData2 = convertJson(addPrefix(Process.FormData));
Process.FormData3 = convertValueToXml (Process.FormData2,'FormData3');
Process.FormData3=Process.FormData3.replace(/prefixstr_/g, "");

Save the process definition after committing the changes.