Forum Discussion

FICO's avatar
FICO
Community Manager
17 years ago

Advanced filtering/content extraction

Advanced filtering/content extraction

Hi,

I have a situation where it would be useful to implement/maintain several rules regarding an area in one place (RMA), but where not all rules are relevant in every context (different rule services).

Is it at all possible to deploy several rule services based on the same rulesets, and use filtering/extraction to limit the rules that are "selected"/included in the rulesets? I.e. that the rules in a ruleset in a deployed rule service is a subset of the number of rules found in the "real" ruleset in the RMA?

The point of this is obviously to reduce the size of the deployed service/the RETE tree.

Any suggestions on how this might be solved would be most welcome

Regards,

Jostein

PS: One of the main selling points is centralised maintenance, which implies overview, control, etc.  This means that breaking the rules up into rulesets is difficult, at least as I see it.

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    Yes, you can do this by using filters together with a ruleset template where rule instances are stored separately.

    1. Create a ruleset template and a rule template.
    2. Add a value holder for the rule template with count of "0 or more" and check "Instances stored separately" flag. This will allow you to keep each rule instance in its own version controlled file.
    3. Create a filter that removes rule instances that you don't want in your deployed project. In my testing I have defined a management property for the SRL Rule entity type and then created a filter that excludes entities of SRL Rule type based on the management property value. But you can use some other criteria, of course, such as rule name or content.
    4. After applying filter in Builder I can see that some rule instances in the ruleset instance have been grayed out. When running filtered project I can confirm that excluded rules did not fire, even though the SRL preview page still shows that excluded rule as a part of the generated SRL code.
  • FICO's avatar
    FICO
    Community Manager

    Hi Andrei,

    This sounds like a solution that could work - I need a bit more time to play with it and see how it would work, but I would just like to thank you for a good answer right away!

    Thanks,

    Jostein