In IIQ, I have a rule and I want to check what all places this rule has been referenced. it might be referenced inside a Rule, Workflow, task etc.
Any advise please ?
We are using SSB basically for all of our projects/clients. This also allows us to search through all files using an IDE or grep -r or Notepad++
Assuming you donât have all objects in an SSB I would create a rule to search through all objects. Well not all as some rules are only used in specific other objects (for example CorrelationRule only in Applications).
As a simple example (not tested):
String ruleName = "MyRule";
List apps = context.getObjects(Application.class);
for (Application app : apps) {
if (app.toXml().contains(ruleName)) {
log.error("Found in "+ app.getName());
}
}
To run this code-snippet you can use the âRule Runner Pluginâ
â Remold
One more way is, you can search in DB directly using a simple query if you have DB access. It is super quick.
@KRM7 can you give an example of such a simple query? (would be great if IIQ uses a noSQL database, so database searches would be even simpler )
We did these kind of checks in IIQ DB directly, let me check my archives.
Any findings on the query ?
Have you tried my suggestion?
â Remold
I couldnât find any traces of what we have done couple of years back. But it is possible to do some operations directly in DB.
For example, once my teammate launched a certification with incorrect reminder email template. We needed to updated a lot of certification objects with correct template. Instead of doing it in IIQ UI/Debug or Beanshell script, I did update the template using a simple SQL query.
I have checked the columns for couple of tables.
Rule
Table name: spt_rule
I couldnât find the info on Referenced Rules
Workflow
Table name: spt_workflow
I couldnât find the info on Rule Libraries
Application
Table name: spt_rule
There are separate columns for each and every Rule type.
I would suggest you to look into the DB table definition and see if you find anything useful. But I started questioning about why the Referenced or Rule Libraries are not stored in respective tables, if not in spt_rule/spt_workflow, where else it is stored. XML object you see in debug is from DB only rite, somewhere it has to be stored.
For time being I would suggest you to proceed with @Remold suggestion, it is a simple script.
If you want to go the database route, it might be a good idea to look at the
IdentityIQ Object Model and Usage.pdf
From this technical Technical White Paper you can see Rules can be linked on many placed in the database, but most rules have a Rule-Type.
Based on the Rule-Type the search can be narrowed down, as most RuleTypes can only be used in specific places.
(for instance an AfterProvisioning-rule can only be used at Applications â Application Definition â select an application or create a new application â Rules â Provisioning Rules section â After Provisioning Rule)
â Remold
Itâs unable to find the Rule name inside app->toXml as the XML doesnât contains the Rules schema inside it.
Ex:
It looks like the application âtestdefâ is not a configured application as it does not contain any other element next to the ApplicationScorecard.
Can you run the rule on any other (configured) application?
I just tested my provided example and it works as expected.
â Remold
What if you implement SSB, export all the objects, maintain the objects maybe in GIT versioning. You can search.
it is ok to not have CI/CD, but it is recommended to have versioning control in place.
This brings me to the idea to export all (relevant) objects and use common search tooling (IDE, Notepad++, find | grep, etc) to find the rule in the exported files.
To export object us the IdentityIQ Object Exporter Plugin.
If âClasses to exportâ is set to âdefaultâ, it will export only the types of objects that are commonly exported during an IdentityIQ project.
â Remold
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.