How to re-initialize queries inside an iteration in Rational Publishing Engine
How do you re-initialize queries on elements within an iteration element in IBM Rational Publishing Engine (RPE)?
Being able to iterate on source data, for example, artifacts in IBM Rational Requirements Composer (RRC), and assign different values each time accordingly, than calling snippet references as many times.
Insert Dynamic data source configuration element corresponding to the element that has queries, so the queries are reinitialized at each iteration. For example:
- Insert a container in your RPE template
- Insert an iteration element inside this container
- Build your java scripting conditions using variables in RPE
- Also, insert a container inside this iteration element that has queries on it, such as Module/Object
- Make sure you configure the data source for this query through a Dynamic Data Source Configuration element for being able to reinitialize the query every time
Note: If you do not use a dynamic data source configuration element, queries are initialized only once throughout the iteration cycle. Hence; the values are evaluated for the query only once.