AnsweredAssumed Answered

Post Execution Code Error: Cannot read property "0" from undefined

Question asked by CyanX on May 15, 2015
Latest reply on May 19, 2015 by ElwynnMartin

We recently installed PAM 4.2.2 on a separate server from SDM 12.9 and imported our process.. We are testing it, and running into an issue when the Select Object Operator (first operator) runs. The error states "TypeError: Cannot read property "0" from undefined". If I comment out the post execution code, it completes successfully, so obviously its something in the code. However, this is the exact same code that previously worked in w/ SDM 12.6, so I'm a little confused. I've been troubleshooting for a while, and have not been able to pinpoint what is causing it. I added a delay operator as the first operator, as I was thinking it may be an issue with timing of the web service call. The only difference in this setup, is, previously PAM and SDM were both installed on the same server.

 

I've deleted all the attributes I was initially selecting, and commented out the corresponding post execution code. Currently I'm using the options below:

 

ServiceDesk Object type: Change Order

Where clause: "persistent_id = 'chg:406285'" (so I don't have to keep creating tickets),

Select Rows: 1

Select Fields List: persistent_id

Post Execution code:

Process.PersistentID = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[0].AttrValue[0].text_


The full error I'm receiving is below:

 

Error in post-execution code. Failed to execute code:

Process.PersistentID = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[0].AttrValue[0].text_

//Process.CustomerCC = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[0].AttrValue[0].text_

//Process.Description = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[1].AttrValue[0].text_

//Process.CustomerFirstName = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[2].AttrValue[0].text_

//Process.CustomerLastName = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[3].AttrValue[0].text_

//Process.ChangeNumber = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[4].AttrValue[0].text_

//Process.CustomerEmailAddress = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[5].AttrValue[0].text_

//Process.ChangeID = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[6].AttrValue[0].text_

//Process.CustomerOPID = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[8].AttrValue[0].text_

//Process.CustomerUUID = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[9].AttrValue[0].text_

//Process.Client = Process[OpName].SelectDataResponse.UDSObject[0].Attributes[0].Attribute[10].AttrValue[0].text_

 

//Process.NewCC = Process.Client + "-" +Process.CustomerCC

//Process.CustName = Process.CustomerFirstName + " " +Process.CustomerLastName;

-- TypeError: Cannot read property "0" from undefined (#9)

 

 

Can anyone think of a way to help determining what is causing this issue? Let me know if you need any more information. Any help you can give would be greatly appreciated.

Outcomes