Tarik Ziyad
Tarik Ziyad

Reputation: 39

Read a property value of a thing from java extension

I'm trying to read a property value of a thing in java extension, I'm always getting the Exception "Not authorized for PropertyRead on ss in PSIM_AlarmManagementServices_Thing"

my code is

Thing AlarmManagementServices_Thing = (Thing) EntityUtilities.findEntityDirect("PSIM_AlarmManagementServices_Thing",
                ThingworxRelationshipTypes.Thing);
        String ss = AlarmManagementServices_Thing.GetStringPropertyValue("ss");

enter image description here

Upvotes: 1

Views: 421

Answers (1)

Tarik Ziyad
Tarik Ziyad

Reputation: 39

now I know why I had this error, when I'm accessing the thing's property from inside a sub-thread, I have this error, but if I access it from the main thread of the Resource it goes without errors. Same things I had before when I was trying to call AddDataTableEntry's service of a dataTable from inside a sub-thread, I didn't have an error but the row wasn't added.

Upvotes: 0

Related Questions