9 Replies Latest reply on Jun 14, 2017 8:37 AM by lguagneli RSS
    dbologna Apprentice

    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

      • Re: Issue on QueryPropertyHistory
        jkaczynski-2 Creator

        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.

          • Re: Issue on QueryPropertyHistory
            dbologna Apprentice

            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

              • Re: Issue on QueryPropertyHistory
                supandey Collaborator

                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?

                  • Re: Issue on QueryPropertyHistory
                    dbologna Apprentice

                    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

                      • Re: Issue on QueryPropertyHistory
                        supandey Collaborator

                        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.

                        • Re: Issue on QueryPropertyHistory
                          jkaczynski-2 Creator

                          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?

                            • Re: Issue on QueryPropertyHistory
                              dbologna Apprentice

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

                               

                    • Re: Issue on QueryPropertyHistory
                      ttielebein Collaborator

                      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