Monday, December 25, 2023

Generate Email address

              import sailpoint.object.Filter;

              import sailpoint.object.Identity;

              import sailpoint.object.QueryOptions;

              import sailpoint.tools.GeneralException;

              import sailpoint.api.SailPointContext;


              int count = 0;

              String firstName = null;

              String lastName = null;

              String userName = null;

              String email = null;

              String domain = "@testMighty.com";

              if (identity != null) {

              if (identity.getFirstname() != null @and identity.getFirstname().equalsIgnoreCase("")

              @and identity.getLastname() != null @and identity.getLastname().equalsIgnoreCase("")) {

              firstName = identity.getFirstname();

              lastName = identity.getLastname();

              userName = firstName + "." + lastName;

              email = userName + domain;

              QueryOptions qo = new QueryOptions();

              Filter filter = Filter.ignoreCase(Filter.like("email", email, Filter.MatchMode.START));

              qo.addFilter(filter);          

              try {

              count = context.countObjects(Identity.class, qo);

              if (count != 0) {

              email = userName + count + domain;

              }

              return email;

              } catch (GeneralException e) {

              System.out.println("GeneralException : " + e.getMessage());

              }

              } else {

              System.out.println("Identity firstname is " + firstName);

              System.out.println("Identity lastname is " + lastName);

              }

              } else {

              System.out.println("Identity object is null");

              }

Friday, December 22, 2023

Additional Loggers for debugging

RefreshTask Debugging:

logger.idRefreshExecutor.name=sailpoint.task.IdentityRefreshExecutor

logger.idRefreshExecutor.level=trace   //Enable Trace logger

logger.idRefreshExecutor.level=debug // //Enable debug logger

===========================================================================

Rapid setup debugging:

#logger.rs.name=sailpoint.rapidsetup

#logger.rs.level=debug

#logger.rslibrary.name=sailpoint.workflow.RapidSetupLibrary

#logger.rslibrary.level=debug

===========================================================================

Workflow Debugging:

logger.workflower.name = sailpoint.api.Workflower

logger.workflower.level=debug

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...