The BPM system provides out-of-the-box functionality for introspecting tables from relational database resources (tables, views and store procedures). At times, though, it may be necessary to operate with complex views of those tables or generic SQL queries. As, in some cases, join among different tables are performed to retrieved information localized in different RDBMS tables. Studio now allows defining these complex queries as a single resource to prevent replicating these complex queries in different areas of the product. These SQL queries can also be customized to receive arguments and make them reusable within a Project.
We further classify queries into two categories, named selfcontained and parametric queries. They differ only in that the latter allows the caller to pass parameters to the query at run-time.
Parametric queries, as the name suggests, allow the caller to specialize the query according to values that are determined at run-time, instead of when the query is designed and introspected. As an example, consider the a query, where we want to be able to specify the actual range for the amount column of the orders when the query is executed.