Provisioningplan Deepcopy Not Setting Identity Correctly

I had a use case where the same AD account on the same identity was being targeted for modification twice (before and after the results from a Powershell script). I tried to used deepcopy to save some code, as in:

ProvisioningPlan planTemplate = new ProvisioningPlan();
planTemplate.setIdentity(identity);

AccountRequest adAccountRequestTemplate = new AccountRequest();
adAccountRequestTemplate.setOperation(AccountRequest.Operation.modify);
adAccountRequestTemplate.setApplication(AD_APPLICATION_NAME);
adAccountRequestTemplate.setNativeIdentity(nativeIdentity);

ProvisioningPlan firstPlan = plan.deepCopy(context);
AccountRequest firstAccountReq = adAccountRequestTemplate .deepCopy(context);

The issue is: deepCopy works great for the AccountRequest, but not for the ProvisioningPlan. When I go to compile the plan with a Provisioner, I get the error: “Missing Identity”. When I manually create new plan instances and set the identity on each, the error disappears. Since both AccountRequest and ProvisioningPlan (the sailpoint.object.* versions) inherit from AbstractXMLObject, it seems to me there’s some issue with the deepCopy method in the source code when it comes to resolving Identity objects.

If this is indeed a bug, how do I submit it to the dev team?

Hey @vsandhu, you have come to the right place. Thanks for making your first post in the community!

It sounds like this is a bug; so you may want to file a support ticket to help you with debugging and to have that issue investigated.

Alternatively, You can also create a new support ticket by sending an email to: [email protected]. Please note that all cases submitted via email are created with the default severity level of “Severity 3 and Priority Medium.” but this can be changed in Compass after the ticket is created.

Good luck and please let us know if you need any further guidance!

Thanks for replying, Michael.

I don’t think I can file a support ticket. I’m not a client - I work for a partner company as an implementer. As I said, I figured out a workaround, so it’s more of a bug report about the behavior of the deepCopy method not being consistent across object types.

I have another bug report not requiring immediate attention that I never filed because I didn’t know how to direct that information to the connector development team, so having a mechanism to log these would be helpful.

Hey @vsandhu,

We are here to help :slight_smile:

Quick tip: A partner can certainly file a support ticket on behalf of a customer, provided that a manager directly employed by the customer has approved the partner to raise support cases.

Additionally, if you have a bug to report, you are more than welcome to submit it to our team using the [email protected] email address. After all, if you’re taking your time to help us make our products better, how could we say no to this? :stuck_out_tongue:

I hope this helps. Thanks again for posting and I hope you have a great rest of your week!

I just wanted to add that the specific bug here is that the “identity” field on a ProvisioningPlan is not serialized to XML. Deep copy works by serializing and then deserializing the object.

1 Like