Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Querybuilder execution time : 0ms

Avatar

Level 4

There is OSGi JAVA Class running as service gets called through custom workflow Handler API.

Workflow gets executed and performs two JCR query using Query Builder API and it it takes Workflow session as parameter to execute JCR Query.
Query are like this QueryStarement : //element(*, dam:Asset)[(fn:name() = 'hksTestDAMUpload.pdf')],

It works perfectly in Non-Production environment including my desktop
On Production, 2nd query does not return any results,  to find more information i enabled log for query execution and found SearchResult.getExecutionTimeMillis is returning 0ms.

Thought?

/Chandra

1 Accepted Solution

Avatar

Correct answer by
Level 10
2 Replies

Avatar

Level 4

Chandra gupta wrote...

There is OSGi JAVA Class running as service gets called through custom workflow Handler API.

Workflow gets executed and performs two JCR query using Query Builder API and it it takes Workflow session as parameter to execute JCR Query.
Query are like this QueryStarement : //element(*, dam:Asset)[(fn:name() = 'hksTestDAMUpload.pdf')],

It works perfectly in Non-Production environment including my desktop
On Production, 2nd query does not return any results,  to find more information i enabled log for query execution and found SearchResult.getExecutionTimeMillis is returning 0ms.

Thought?

/Chandra

 

 

How Production Author could be different than QA or Development? In fact i ran same query in CRX console and it returns result in production. I can only think JCR Session is not available and query is not getting executed that's why Searchresult.getExecutionTimesMillis() is returning 0. Any body thoughts?

Avatar

Correct answer by
Level 10