Testing IIQ Rules (Context Issues) in RDK: Delimited File Connector Scenario

Which IIQ version are you inquiring about?

8.3

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

I’m currently developing a pre-aggregation processing rule as part of a Rule Development Kit (RDK) project in IntelliJ and I’m running into serious challenges when simulating IdentityIQ context and custom objects for local testing.

My Goal

Scenario: I want to simulate a delimited file connector (an HR feed file) to validate my logic before moving the rule into the real IdentityIQ environment.
Production Reality: In actual IdentityIQ, this rule would reference a custom object (an XML) for parameters (e.g., email template, file paths, etc.). The engine automatically injects context so I can do something like:

Custom customObject = context.getObjectByName(Custom.class, “Custom-Source-Application-Configuration”);

Local Testing in IntelliJ (RDK): For simpler helper methods that don’t need context, I’ve succeeded in writing JUnit tests where I create a Beanshell Interpreter, do interpreter.set("someVar", value), then call the function. Those tests work fine.

Where I’m Stuck

As soon as I try to test any logic that needs context (for example, calling context.getObjectByName(...) to retrieve a custom object), I get NullPointerExceptions or BeanShell parse errors in my local environment. I tried:

  1. Dummy Context & Custom Classes
  • I wrote a DummyContext that implements something like:

public Object getObjectByName(Class clazz, String name) {
// return a dummy Custom object
}

  • Also wrote a dummy Custom class, Attribute class, etc.
  • Despite that, top-level rule code still throws an error if it references config.get("app") or tries to run context.getObjectByName(...) at load time.

Basically, I can’t replicate IdentityIQ’s injection of context and custom objects reliably in my IntelliJ + Beanshell setup. The rule development kit approach, as I understand, is to create a test method for each piece of logic, create a Beanshell Interpreter, set variables, then eval(...) the rule code. But the moment I reference production-like code that expects context or a real custom object, it fails.

Key Details & Questions

  1. RDK Best Practices: Is there a known pattern or recommended approach for testing logic that references custom objects?
  2. Dummy Object Setup: If I continue with the RDK in IntelliJ, how do I correctly inject the dummy context so that code like context.getObjectByName(...) works without a NullPointer? I’ve tried scripts that define class DummyContext implements Context { ... } and instantiate context = new DummyContext(). But top-level code in the rule still fails if it references config or context too early.

Is it suggested to just code within the sailpoint console instead and test iteratively through the debug browser, basically i can use the rdk to do coding for convenience where i see the functions come up with intelliJ snese, like when typing Identity, etc but really just do the testing inthe object browser itself? i was really liking the vibe of the RDK, but it has been too much of a nuisance to get it to work.

Thank you so much—I really appreciate any guidance. I’m new to Sailpoint, and the RDK approach, but I’d love to keep using it if there’s a known pattern for dealing with context references.

Thanks in advance!

Why not just test using connectorDebug in a real environment?

Hi @raygarg
It might be easiest to set up the HR application in you IdentityIQ sandbox with some sample/dummy data. You can do better testing that way.