rule-enginebusiness-rulesjrulesibm-odm

How to find how many rules are associated with a rule task in IBM ODM/Rule Designer 8.8.1?


I'm new to the IBM Rule Designer (8.8.1) and my team has inherited a project that contains numerous rule flows, subflows, rule/action tasks, etc. I'm attempting to document at the task (ie. rule flow node) level, but there are instances where 100+ rules are included in a rule task. Is there a way to query a rule task to quickly find the number of rules that are associated with a specific rule task? I couldn't find any query condition phrases or objects that appeared to say something like Find all business rules such that each business rule [is contained within <a rule task>].

Any ideas on how to accomplish that? Is there a way to turn the results from a list of rules into an integer count of rules?

Thanks for your help; please let me know if clarification is needed.


Solution

  • Short Answer: I don't think there is an easy way, but there is a way.

    Using queries, I think the closest you can come is to find all rules in a rule package. It is common (and good) practice for the rule tasks to line up with rule packages, so that is often useful or good enough. If the rule selection specifies individual rules, queries probably won't help.

    It is easy to go the other way -- to find which rule task(s) a rule appears in. Just right-click on a rule, either in the Rule Explorer view or the Rule Editor view, select 'Find Rule Dependencies' then select 'Ruleflows which may select this rule'. Not what you asked for, but often helpful.

    Note: When you run a query or do any other search, the results appear in the Search view and the number of matches is included at the top. Be aware that this count may include the same rule more than once if it appears in multiple rule tasks.

    What I would do to count the rules of a rule task that are specified individually is look at the source code for the rule flow. Open the ruleflow in the Ruleflow Editor and select the *.rfl tab. Scroll down or search to find the tag that you are interested in. You can turn on line numbering (right-click, Preferences, Show line numbers) and do the math yourself. Or you can select the tags from the , copy it to the clipboard, and paste it into another program that counts lines. You could use Excel, which automatically counts the number of items selected, or another editor, or even create empty file in Eclipse with line numbering on.