Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi all,
I have been working on a Java application that pulls a list from a SharePoint server and stores the list into an InfoTable property. I have my properties defined as so:
@ThingworxPropertyDefinitions(properties = {
@ThingworxPropertyDefinition(
name="List",
description="Demo SharePoint List",
baseType="INFOTABLE",
category="Status",
aspects={"isReadOnly:true"}
),
@ThingworxPropertyDefinition(
name="FaultStatus",
description="Fault status",
baseType="BOOLEAN",
category="Faults",
aspects={"isReadOnly:true"}
),
and initializing from annotations like:
super.initializeFromAnnotations();
Now the client is being picked up by Monitors > RemoteThings. and the isConnected property is being set to true.
Is there something I'm missing for why the application isn't pushing the defined properties in the code?
Thanks,
Bryan
Solved! Go to Solution.
I have managed to solve my own issue.
The problem was that I did not include all the jar's from the lib folder into my project, and during run-time the software was not providing any feedback.
More specifically, to get the Annotated properties functioning correctly I had to include the jackson-*.jars
After including them and re-running the program, I was able to pull the properties from the client.
Bryan
Hi
You need to use the SetProperty(PropertyName, value) method to set the values in the agent, you then need to use the UpdateSubscribedProperties(timeout) method to push the values to the ThingWorx server.
Regards
Ian
Ian,
Thanks, however I managed to solve my own problem. I'm writing a post to reply to this topic.
I had already had the setProperty() and updateSubscribedProperties().
Thanks anyway!
Bryan
I have managed to solve my own issue.
The problem was that I did not include all the jar's from the lib folder into my project, and during run-time the software was not providing any feedback.
More specifically, to get the Annotated properties functioning correctly I had to include the jackson-*.jars
After including them and re-running the program, I was able to pull the properties from the client.
Bryan