Custom Evaluator in Certification

Which IIQ version are you inquiring about?

8.3p3

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

I have a requirement to add an additional column to certification UI that needs some customization to an already existing identity attribute. For that, I created custom evaluator and configured that in UIConfig. But, wheneever I try to access the UI, I am getting the following exception:

2025-01-28T18:35:02,647 ERROR http-nio-8080-exec-1 rest.ui.jaxrs.AllExceptionMapper:25 - Uncaught JAX-RS exception.
java.lang.RuntimeException: Could not create a column evaluator of type ‘com.client.web.view.certification.ClientCertificationUserStatusColumn’
at sailpoint.web.view.ViewBuilder.(ViewBuilder.java:62) ~[identityiq.jar:8.3p3 Build d5deab2519b-20230629-092050]
at sailpoint.service.certification.CertificationItemListService.getCertificationItems(CertificationItemListService.java:280) ~[identityiq.jar:8.3p3 Build d5deab2519b-20230629-092050]
at sailpoint.rest.ui.certifications.CertificationItemListResource.getCertificationItems(CertificationItemListResource.java:90) ~[identityiq.jar:8.3p3 Build d5deab2519b-20230629-092050]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

Here is the entry added to UIConfig (uiCertificationItemWorksheetColumns):
<ColumnConfig dataIndex="Identity-employeeStatus" evaluator="com.client.web.view.certification.ClientCertificationUserStatusColumn" groupProperty="Identity.employeeStatus" headerKey="User Status" property="Identity.employeeStatus" sortProperty="Identity.employeeStatus" stateId="Identity-employeeStatus"/>

Here is the code for evaluator:

package com.client.web.view.certification;

import java.util.Map;

import org.apache.log4j.Logger;

import sailpoint.object.Identity;
import sailpoint.tools.GeneralException;
import sailpoint.web.view.certification.CertificationItemColumn;

public class ClientCertificationUserStatusColumn extends CertificationItemColumn {
	private static final Logger logger = Logger.getLogger(ClientCertificationUserStatusColumn.class);
	
	private static final String COL_TARGET_ID = "targetId";

	@Override
	public Object getValue(Map<String, Object> row) throws GeneralException {
		logger.error("row: "+row);
		
		String userStatus = null;
		
		String identityId = (String)row.get(COL_TARGET_ID);
		logger.error("identityId: "+identityId);
		
	    Identity identity = this.getSailPointContext().getObjectById(Identity.class, identityId);		
		
		if(null != identity) {
			String employeeStatus = identity.getStringAttribute("employeeStatus");
			logger.error("employeeStatus: "+employeeStatus);
			
			switch(employeeStatus) {
				case "A":
					userStatus = "Active";
					break;
				case "T":
					userStatus = "Terminated";
					break;
				case "L":
					userStatus = "On Leave";
					break;
			}
		}
		
		return userStatus;
	}
}

The primary issue was that I compiled the java class using higher java version than tomcat was using. After changing that, it worked fine with minor change in the code.

2 Likes