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

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

Issue on QueryPropertyHistory

dbologna1
1-Visitor

Issue on QueryPropertyHistory

When I use QueryPropertyHistory and increase the time period (change the End Time) some fields returned are empty, but before these values were present

9 REPLIES 9

Hello Dimitri,

It is a mashup, as far as I see. Could you test this service from Composer and check the result - to make sure that it's not an error caused by browser caching. What version of Thingworx do you use (H2, Neo4j, PostgreSQL)? Please provide some information that could help to replicate this behavior. Do you perform query to get data stored in a ValueStream?

Regards,

J.

Hi Jakub,

Yes , It is a Mashup and I used this inside the Composer (View Mashup).

The version of Thinworx that I used is 7.2.0-b155 Neo4j.

I used  the standard service like QueryPropertyHustory, in the following picture the service used

supandey
19-Tanzanite
(To:dbologna1)

Dimitri, I have seen this behaviour but the strange part is that for me the entries became available again after few refreshes. Could you check the HomeMashup of this ValueStream or if you Test this service directly in the ValueStream thing to see if the data is still there?

Hi SusHant,

The data inside the values stream are present because if I reduce  the time period these values are in the grid.

I think the problem is the value of MaxItems parameter  of service QueryPropertyHistory.

If the service return more rows of the MaxItems value then there is the problem on the data,

if the number of rows is smaller of MaxItems I don't find any problem.

Before running the QueryPropertyHistory service I need to find the total number of rows (for a specific period), and use that result as input parameter for the QueryPropertyHistory service (MaxItems).

Is there a service (different from QueryPropertyHistory) that I can use to extract the total number of rows (for a specific period) without MaxItems parameter?

BR

Dimitri

supandey
19-Tanzanite
(To:dbologna1)

Hi Dimitri, sorry i am not aware of any other service which you can use for your specific purpose, may be someone here have any idea on this.

Hello Dimitri,

Currently there is no OOTB service to count the number of entries in the VS.

I have tested your hypothesis and it's working fine, even if maxItems is lower. The mechanism is: first, query filtering (by start date, end date so on), then maxItems limiting. Just made a quick test:

In my VS I have around 20 rows that matches start date and end date, but it's limited to the 8 latest.

If you run QueryPropertyHistory Test from the Composer with the exactly the same parameters as from mashup, what result you get?

If you run QueryPropertyHistory Test from the Composer with the exactly the same parameters as from mashup, what result you get?

 

Good morning,

I'm permorming the same issue in mashups and also in service. I would like to be sure that if I execute this query I can use all data returned tohandle the response. Adding maxItems don't change the result.

What this problem depends on?

ttielebein
14-Alexandrite
(To:dbologna1)

When do you update your properties? In Neo4J, there is very likely the chance that if you are updating your properties while you are trying to load the mashup, this would be the result. You would diagnose this by seeing if there are deadlocks in the thread dumps (try using jstack).

Hope this helps!

Tori

Announcements


Top Tags