Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi,
I have a Virtual Thing defined in Java SDK. The corresponding remote thing in platform has valuestream associated with it. I am writing a custom service in virtual thing which needs to invoke the queryPropertyHistory Service so that i can query the value stream with query parameters. Can any one help me to achieve this?
Thanks,
Azim
Hi azim hawaldar,
Have you tried with following:
InfoTable result = client.invokeService(entityType, entityName, service, parameters, timeout);
Example:
InfoTable result = client.invokeService(ThingworxEntityTypes.Things, "Thing_Name_Here", "QueryPropertyHistory", params, 5000);
I hope it helps.
Hello Ankit Gupta,
I need to send query parameters like startDate, endDate, oldestFirst and query. So how can I send these params ? startDate, endDate and oldestFirst seems to be easy as these are first level object, the query param is bit complex since its an jsonObject. Appreciate your help if u can give me example as above with param.
Thanks,
Azim
Hi azim hawaldar,
I haven't tried Query in the Java Extension.
But per my understanding; we have create a Filter first and then we can convert it to Query jsonObject.
Do let me know if you face any issue; I will try to implement it.