Skip to main content
1-Visitor
February 16, 2016
Solved

Java Edge SDK not pushing properties to Composer?

  • February 16, 2016
  • 3 replies
  • 2318 views

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

Best answer by bturek

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

3 replies

1-Visitor
February 17, 2016

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

bturek1-VisitorAuthor
1-Visitor
February 17, 2016

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

bturek1-VisitorAuthorAnswer
1-Visitor
February 17, 2016

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