Create a new key in node called "dependencies" which will be an array of strings. Which will save module names on which it is dependent. And on module uninstall we will check if any node is dependent on that module and if any rule is active using that node than disable it.
Also add a validation that that a node is not present in a rule whose dependent module is not enabled.

Comments

vishalkhialani created an issue. See original summary.

rensingh99’s picture

I will work on this.

rensingh99’s picture

I have created a patch. Please review it.

rensingh99’s picture

Please check latest patch.

rensingh99’s picture

Please check latest patch.

akshay.kelotra’s picture

Status: Active » Reviewed & tested by the community

I have reviewed this patch and tested it. It is working fine.

neeravbm’s picture

Status: Reviewed & tested by the community » Fixed

I have merged this patch to dev branch.

  • rensingh99 authored 2dd53f6 on 8.x-1.x
    Issue #3082482 by rensingh99, vishalkhialani, akshay.kelotra, neeravbm:...
  • rensingh99 authored ec264e1 on 8.x-1.x
    Issue #3082482 by rensingh99, vishalkhialani: Add module dependency...
neeravbm’s picture

Status: Fixed » Closed (fixed)