Rule Running Twice

Hello

Hoping someone can help me here. I have a rule on a provisioning policy that goes out and grabs some data from a linked account so that it can be provisioned to a different end point. It is working ok but it looks like it is running twice. I kick it off by adding a user to the business role and approving the request. The account is created and everything looks good, it just seems weird to see double entries in the logs.

Here is a code snippet

public String fieldValue(theAttrib) {
log.error("xxx The attribute is " + theAttrib); 

	Application dataApp = context.getObjectByName(Application.class, "dataApp");
	Link myLink=identity.getLink(dataApp);
	
	if(myLink!=null) {
	  
			if(myLink.getAttribute(theAttrib)!=null) {
				
                       theValue=myLink.getAttribute(theAttrib);
		  					return theValue;
				
			} else {
				retrun "";
						
			}
	  
	}
	


  
switch(field.getName()) {
  
case "startDate" :

returnValue=fieldValue("StartServiceDateList");

break;
	
case "deptid" :

	returnValue=fieldValue("DeptIdList");
	
break;

}
return returnValue;

In the logs I see this

ERROR default task-50 rule.Rule-FieldValue:166 - xxx The attribute is StartServiceDateList
ERROR default task-50 rule.Rule-FieldValue:166 - xxx The attribute is DeptIdList
ERROR default task-50 rule.Rule-FieldValue:166 - xxx The attribute is StartServiceDateList
ERROR default task-50 rule.Rule-FieldValue:166 - xxx The attribute is DeptIdList

When you perform an access request (Manage User Access), the workflow will 1st try to see if there are any policy conflicts (when enabled). For this the workflow simulates the provisioning and inspects the result for policy violations. If none found or violations have been approved the workflow will continue with the actual provisioning.

So it is not strange to see a before provisioning rule running twice.

– Remold

1 Like

Got it,

Thanks very much for the explanation.

1 Like

Hi @Seadog

Delighted to know that your question was answered. Kindly mark @Remold last response as the solution to benefit others seeking answers and to foster our Developer Community.

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