Not Able to Excute ProvisioningPlan in IdentityNow

Hi All,

I have written a global rule and am facing an issue while validating it.

Requirement: I have onboarded users and roles from a database table. Whenever a user requests an entitlement, we need to provision to the Oracle ERP Cloud connector. To test this, I’ve built a small piece of code, but I am encountering the following error during validation.

Method execute <sailpoint.api.Provisioner sailpoint.api.Provisioner> is not allowed for object type sailpoint.api.Provisioner. 28: p.execute()

Here is my code.

import sailpoint.api.Provisioner;
import sailpoint.api.SailPointContext;
import sailpoint.object.Identity;
import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AccountRequest;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import sailpoint.tools.GeneralException;
		
		Identity identity = context.getObject(Identity.class, "ABC");
		
		ProvisioningPlan newPlan = new ProvisioningPlan();
		AccountRequest accReq = new AccountRequest();
		accReq.setApplication("Oracle ERP Cloud");
		accReq.setOperation(AccountRequest.Operation.Modify);
		accReq.setNativeIdentity("21321321312321321321");
		AttributeRequest attr = new AttributeRequest();
		attr.setName("group");
		attr.setValue("546564667667676");
		attr.setOperation(ProvisioningPlan.Operation.Add);
		accReq.add(attr);
		newPlan.add(accReq);
		newPlan.setIdentity(identity);
		
		Provisioner p = new Provisioner(context);
		p.setNoLocking(true);
		p.compile(newPlan);
		p.execute();

Could you please guide me?

Thank you for your help!

  • List item

Hi @Surya353 ,
The rule validator is generally used for cloud rules and as you see the error is saying an connector rule so the error is thrown.

To validate connector rule use this: validate-connector-rule | SailPoint Developer Community
To deploy rule use this api: create-connector-rule | SailPoint Developer Community

also refer to this page for connector rule structure: Connector Executed Rules | SailPoint Developer Community

1 Like

Thank you Gourab.

Let me test this rule.

1 Like

Hi,
You can test your connector rule by using Rule Development Kit please check below link.

And in your code “import sailpoint.api.Provisioner” please check this object where you got this?

Thanks,
Siva.K

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.