Foundry Rules app customisation

Hi Team,

We want to archive/ suspend certain rules in the Foundry Rules App (without deleting them so we can restore them back when necessary) so they won’t be triggered every build time.

As the Foundry Rules App doesn’t have a default function to do that (only create and delete), we thought of the below approach, implemented it but got some challenges along the way:

  • create an extra property for the Rule object (a boolean property is_archive for example), and an action to update this field from the front end, then write back to the Rule object.
  • modify the transform pipeline to run only those rules with a true is_archive flag).

2 challenges that we got:

  • build is failed because it doesn’t support edit-only is_archive property (no way to back it up with a column as the default Rule dataset doesn’t have this column)
  • no way to find the transform pipeline as it’s not located in the project folder. When I ticked ‘self-manage transform’, and try to deploy a repos, I can’t copy the code as instructed (look like the Copy button is removed even the tool tip says you should be able to copy after Generate’).

Is there any way / or other approach that we can overcome this limitation? Open for suggestions.

Thanks team.

Hi @ausdevdataengineer ,
I had the same issue - the workaround I found was to create a seperate object “RuleArchival” with a foreign key property that links to an individual rule.

So the action to “Archive/Unarchive” would be create a new “RuleArchival” object.

Then we used this in Functions/Object views to implement our desired logic.

2 Likes

hi mate, could you please clarify how could you use the RuleArchive object to manipulate the original Rule object to exclude certain rules form running every build?

What you can do is have the RulesArchive object have the exact same properties as the Rules object.

Now, when you archive a rule, you actually delete the Rules object and create a new RulesArchive object with the same properties.

If you unarchive it, you recreate the RulesObject again.

1 Like