Issue Calling Method from Referenced Rule Library

Which IIQ version are you inquiring about?

8.4p1

Share all details about your problem, including any error messages you may have received.

Hi All,

We are facing an issue when calling a method from the common rule library. The method is actually defined in another rule library, and although we are referencing it, it is not working. could you please find the below error.

An unexpected error occurred: Typed variable declaration : Command not found: generateEmailAddress(java.lang.String, java.lang.String, java.lang.String) : at Line: 5792

could anyone help us to resolve this

Thanks,

Ranjith M.

@Ranjith25 are u calling from workflows? if yes then add in workflow also.

also check method must be static.

if you will attach the rule here then it should be easy to find the root cause.

some ref here : RuleLibrary Reference in another RuleLibrary - IdentityIQ (IIQ) / IIQ Discussion and Questions - SailPoint Developer Community

Hi @Ranjith25 - please post the rule if you can. Also make sure you are passing all 3 string variables to the method.

From error message, it seems that code is unable to locate method generateEmailAddress.

Could you explain from where you are calling this method and is this method stored in some Rule object ?

Hi @Ranjith25

Please check the method generateEmailAddress in your RuleLibray. Make sure that the method that you have in the RuleLibrary have all the three parameters as String.
Check Line 5792 of your RuleLibrary, where your method starts.

Slight Correction.. methods doesn’t need to be static.

Also, a weird behavior.. where ever you reference the objects, you need to save both child and parent to implement the new change even if there is no change.

In your case, if method A is in Rule 1 and method B is in Rule 2. Rule2 is added as a reference in Rule1. Even you only make change in Rule2, you still need to save Rule1 to enforce changes from Rule2.

Try it out, see if it works.

Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(:heart:,:+1:, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.

Hi, main reason might be generateEmailAddress method either any of developer had changed but didn’t ran the cache clearance or parameter what you are passing not matching with declared method. Or do one thing delete the id just add Rule reference again . Check its working or not. Also please check closely sometime its typo or spelling mistake error :wink: