UC5 - Share the Result Set Filters

This use case shows how to define filters in a RESULT SET and share it with other RESULT SETS.

See Also
Creating Input Parameters
RESULT SET
FILTER
Defining Data Queries

Context: In this example, you have a processing graph in which:

  • The first branch searches for tickets.
  • The second branch searches for comments.

You want to apply filters on the first branch, for example, return tickets for a ticket owner, and get this filter applied to the second branch, to see the comments made on the tickets belonging to the ticket owner.

The data query looks like:

  1. From the top bar, click $ Input parameters, and in the Parameters panel:
    1. Click to add a Parameter.
    2. Give a Name to the parameter. For example, ticket_predicate.
    3. In Arguments, enter item, click Type to select Item, and specify what the argument expects. For example, a ticket, with Item<issue.Ticket>.



    4. For Return type, select Boolean.
    5. Select DataQuery parameter, to make the input parameter available in data queries.
  2. In the first branch, configure the RESULT SET operator to inject all its filters into the input Parameter defined in the previous step.
    1. In the Filters section, specify the filters to apply.
    2. In the General section, for Predicate parameter, select ticket_predicate.



  3. In the second branch, configure a FILTER operator to call the ticket_predicate Parameter with the parameters of the first branch.



    If the ticket matches the filter, the operator returns the comments. You can therefore see the matching comments in the RESULT SET view of the second branch.