SailPoint common rule library general query

Hello Sailors

in webservices before and after operation rule I’m calling methods that are there in common rule library
But in app XML I didn’t find

Rule reference library tag and that comman rule library id and name

How these two are linked in new to SailPoint IIQ I’m more of ISC person

Thanks in advance

Regards,
Avi

Hi @amulpuru , I think you are referring the rule Libraries . Basically in IIQ , Common methods can be defined in one rule and that particular rule can be referenced in multiple places .
Think as of Java class . You write the methods in Java class and then you import that class and use the methods .
In IIQ to use Rule Library we need to use the ReferenceRules tag . These objects will be available in same object type “Rule” .

Open Debug → select object type “Rule” and search the same with ID or Name.

Hope it helps.

Hello @amulpuru

To reference a rule library from another rule, include a <ReferencedRules> element in the rule XML, naming the rule library in the <Reference>. The methods within the library can then be invoked from within the rule’s Source element.

<Rule…>
<ReferencedRules>
 <Reference class='Rule' name='My Library'/>
</ReferencedRules>
<Source>
doSomething(); //invokes the doSomething method in My Library
</Source>
</Rule>

Note that Rule references can only be one level deep. If you have A → B → C and you run A, B will be loaded, but C will not!

<Rule name="A"...>
<ReferencedRules>
<Reference class=... name="B"/>
</ReferencedRules>
<Source>
doSomething();
</Source>
<Rule name="B"...>
<ReferencedRules>
<!-- This will be IGNORED! -->
<Reference class=... name="C"/>
</ReferencedRules>
<Source>
void doSomething() {
  // When B is loaded from A, C is not loaded, so this will throw
  // an Exception because `reallyDoSomething` is not found.
  reallyDoSomething(); 
}
</Source>
<Rule name="C"...>
<Source>
void reallyDoSomething() {
  System.out.println("You'll never see this");
}
</Source>