How to trigger Manager Certifications in Custom Workflow

Which IIQ version are you inquiring about?

8.3

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

I have a use case to add a Manager Certification in an existing custom Contractor to Employee workflow.

Looking for some reference code or the process on how to achieve this requirement.

You can use something like this. Some of it may have changed in latest version but this was working fine few years ago on a previous version.

            	Identity requestor = context.getObject(Identity.class, launcher); 
            	Identity identity = context.getObject(Identity.class, identityName); 
            	// Create new Scheduler 
            	CertificationScheduler scheduler = new CertificationScheduler(context); 
            	// Create Schedule and set run now to true to launch the certification immediately 
            	CertificationSchedule schedule = scheduler.initializeScheduleBean(requestor, Certification.Type.Identity); 
            	schedule.setRunNow(true); 

            	CertificationDefinition definition = schedule.getDefinition(); 
				//Use all the methods applicable for your case available for CertificationDefinition in order to set configurations
				 definition.setName("Movers Certification for : " + identity.getDisplayableName() + " [" + new Date().toString() + "]"); 
            	Identity certGroupOwner = context.getObjectByName(Identity.class, "spadmin"); 
            	definition.setCertificationOwner(certGroupOwner); 
                definition.setRequireReassignmentCompletion(true);
            	definition.setCertifierSelectionType(CertificationDefinition.CertifierSelectionType.Manual); 
            	if(userManager != null && !userManager.isEmpty()){ 
            		definition.setCertifierName(userManager);
            		log.debug("UserManager");						
            	} else { 
            		definition.setCertifierName("spadmin"); 
            	} 
            	List identities = new ArrayList(); 
            	identities.add(identityName); 
            	definition.setIdentitiesToCertify(identities); 
            	definition.setIncludePolicyViolations(true);
				Integer activePeriodDurationAmount = 14;
				Date today = new Date();
            	log.debug(" The certification period is 14 days");			
            	definition.setActivePeriodDurationAmount(activePeriodDurationAmount.longValue()); 
            	definition.setActivePeriodDurationScale(Duration.Scale.Day);
				//..... set other configurations like reminder , escalation using available methods
				
				
				// Schedule task to run, passing in schedule (which has certification definition attached) 
            	TaskSchedule taskSchedule = scheduler.saveSchedule(schedule, false);

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