cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Building Custom Integrations for ThingWorx Navigate - Course

vcavic
Amethyst

Building Custom Integrations for ThingWorx Navigate - Course

Hallo, 
I'm following the course Building Custom Integrations for ThingWorx Navigate | Integration Tier - The Resource - Making Calls to Integration Hub Services. And always get errors 

"Error executing service GetPartByNumber. Message :: Wrapped java.lang.NullPointerException - See Script Error Log for more details."
 

var filter = '{"filters":{"fieldName":"Number","type":"EQ","value":"' + Number + '"}}';

var params = { /* INFOTABLE */
resources: 'WindchillDemoPartResourceProvider' /* INFOTABLE */,
serviceName: 'Get' /* STRING */,
params:{
dataShape: {
fieldDefinitions: {
dataShapeName: {
name: "dataShapeName",
baseType: "STRING"
},
query: {
name: "query",
baseType: "QUERY"
},
extraParams: {
name: "extraParams",
baseType: "JSON"
},
dataShape: {
name: "dataShape",
baseType: "INFOTABLE"
}
}
},
rows: [{
dataShapeName: DataShape,
query: filter,
extraParams: undefined,
dataShape: undefined
}]
}
};

// result: INFOTABLE dataShape: ""
var result = Things["PTC.Resource.ResourceManager"].CallServiceOnProvider(params);

 

Any Suggestion ?

 
 
3 REPLIES 3

Re: Building Custom Integrations for ThingWorx Navigate - Course

Please attach the Script Error log, and I will see if I can identify the issue.

Re: Building Custom Integrations for ThingWorx Navigate - Course

@barko 

2021-04-06 06:11:17.688+0000 [L: ERROR] [O: S.c.q.l.c.Logger] [I: DemoUtilityThing] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-3] Error in: DemoUtilityThing.GetPartByNumber javascript service
at GetPartByNumber:37

Re: Building Custom Integrations for ThingWorx Navigate - Course

That didn't help. I think you will need to attach the complete log file.

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.