Forum Discussion
FICO
17 years agoCommunity Manager
Reg: Display of variable added in one Instance across other instances
Reg: Display of variable added in one Instance across other instances Hi, I have created two group templates and accordingly two instances each.. In the instance of Group template A i created one ...
FICO
17 years agoCommunity Manager
If you look at the arguments you can set on the SRL Entities Provider (either when used in a value holder or when you create the providere instance), you will see that you can filter based on subproject, ruleset and type, among other things. (These are the most useful ones when filtering)
If you place your group template instances in different subprojects, and configure the providers to only select variables from a certain sub project, that is one way to filter which variables are accessible.
Another way is to use a ruleset template as an intermediate in the group template. Note that this makes the variables local to the ruleset, not global, but depending on your needs, that might be an option. In that case, filter based on the ruleset names.
The third option is to filter based on type. For this to work, you actually have to create variables of different types in your group templates. The filter will make sure that only variables of the given type (or subtypes for class hierarchies) are available in the provider.
There is a fourth option, and that is to subclass the SRL Entitites Provider. This is slightly more technical, but entirely doable (I do it myself in several projects).
The trick is to subclass the com.blazesoft.template.repository.provider.NdPromSrlEntitiesProvider. Here, you can override for example the methods that return argument descriptors and parse arguments to the provider. This way you can add arguments that you can use to configure what kinds of entities are returned by the provider, for example based on regular expressions. If you do not need arguments, you can also simply override the getAllowedInstantiationValues method and filter the initial list from the original provider, before returning the result to the client (RMA).
HTH,
Jostein