The groovy filter expression is the same as you would specify in Combination filter of the matrix job
and is applied on top of the combination filteer already set for the matrix job.
So as you have 3 axis with multiple items.
e.g.
TARGET = target_a, target_b
SIGNING = release, development
PRODUCT = Product_1, ... Product_15
The combination filter to build just Product_5 for all targets and signing would be
(PRODUCT=="Product_5")
or to build just product 5 for development
(PRODUCT=="Product_5" && SIGNING=="development")
The combination filter in the matrix job should be set so that only the valid configurations can be built,
as when it is triggered from the upstream job using the Matrix Subset parameter it will be combined together.
If all of the combinations of the Axis are valid you do not need to set the combination filter.
Now if you start the job with a Matrix subset parameter you can define which axis combinations should be built,
So if the combination filter on the matrix job is set to build just Product_5 and Product_10 for all targets and signings
(PRODUCT=="Product_5" || PRODUCT=="Product_10") - this would produce 8 combinations.
To limit this just Product_5 and development, you would trigger the build with the this combination
(PRODUCT=="Product_5" && SIGNING=="development")
Which would produce 2 builds rather than the default 8 builds.
So if your 2x2x15 is the full set with no combination filter, then you can just run that as normal,
and if you want the smaller 2x2x1 set you would start that with a matrix subset parameter.
If you dynamically want to set this from an upstream job, I would suggest having the following groovy expression
(${ALL} || <restricted subset expression>)
which means that you can have env property injected into the build as for ALL="true" to build all of the matrix and set it to false to build the subset.
I tested this by just using a boolean parameter on the upstream build.
Note: you can't just export the Value in a shell, as you need to add it to the Jenkins build Environment. (use the EnvInject plugin if needed.)
Of course the expressions can be made as complex as you like depending on your needs.
e.g. selecting one of three subsets could be done as
(${SUBSET}=="Set1" && <subset1 expression>) || (${SUBSET}=="Set2" && <subset2 expression>) || (${SUBSET}=="Set3" && <subset3 expression>)
Chris