Passing provisioning plan into web services beforeOperationRule

Hello Everyone,

We are writing a web services beforeOperationRule, where we need to pass our provisioning plan to fetch email attribute value. from plan into our code. We have written the part but not sure if plan is being passes (below is the part).

if (provisioningPlan != null) {
			Identity identity = provisioningPlan.getIdentity();
			List accountRequests = provisioningPlan.getAccountRequests();
			if (accountRequests != null && accountRequests.size() > 0 && identity != null) {
                for (AccountRequest accountRequest: accountRequests) {
                    	if (AccountRequest.Operation.Create.equals(accountRequest.getOperation()) && (accountRequest.getAttributeRequest("email").getValue()) != null)
						planEmail = accountRequest.getAttributeRequest("email").getValue();
					}
				}
			  }

Can you please do let us know if anything is wrong here.

Thanks in advance

Identity identity = provisioningPlan.getIdentity();

This will be null inside a Connector Rule. Hence identity != null will always be false.

If you don’t have any use of identity object in your rule, then get rid of these

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