It's all about the answers!

Ask a question

QueryClient searches in whole repository?


0
1
Marko Tomljenovic (31647109) | asked Sep 01 '17, 6:21 p.m.

Hello,

we are using RTC 6.0.4.

In a custom tool we are creating and executing queries programmatically.
Finally we are making a call to:

IQueryClient.getResolvedExpressionResults(IProjectAreaHandle projectArea, Expression expression, ItemProfile<T> profile);

If the provided expression has no constraint regarding project area then the query is executed on the whole repository.
Is that by design? Is that a hidden feature of 6.0.4? I have the feeling it was different in RTC 6.0.3.

If that is by design for what reason is then the parameter projectArea required at all?

Thank you


Comments
Ulf Arne Bister commented Sep 04 '17, 11:20 a.m.

Marko, interesting.
If you remember back in 4.0.6 days I communicated on the little known fact that the "Show Recent Work" query in the Eclipse is in fact running across all (connected) project areas and if copied can be tweaked to be a cross project area query. I believe this probably internally makes use of the the IQueryClient behavior you describe.
I assume all is (reasonably) well until you try to parse query results from project areas with differing process templates, some of which might be altogether missing the parts you are trying to query. Still, using this is not at all recommended due to the severe project impact this is bound to have on productive systems with several huge project areas. At the very least I would flag any such code utilizing this as "resource intensive scenario" so it sends the appropriate start / stop signals to the Mbeans gathered by JTS.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.