3 Replies Latest reply on Oct 2, 2013 5:47 PM by 1025328

    Display Custom Error Message in OIM 11g

    user4173086
      Hi,

      I'm trying to display an error message from a validation event handler but seems that am missing something. When the "oracle.iam.platform.kernel.ValidationFailedException" is thrown from a validation handler an error message is displayed: "An error occurred". If an error code is provided (see code below) then the message looks like: "An error occurred. The corresponding error code is ERR-0001". I guess that some resource bungle with corresponding messages should be provided.

      the code used:

      package test;

      public class UserGeneralValidationHandler implements oracle.iam.platform.kernel.spi.ValidationHandler
      {
      ...

      @Override
      public void validate(long processId, long eventId, Orchestration orchestration)
                     throws ValidationException
      {
      ...
      String errorCode = "ERR-0001";
      String message = "Simple validation message.";

      ValidationFailedException ex = new ValidationFailedException(message);
      ex.setProcessID(processId);
      ex.setErrorCode(errorCode);

      throw ex;
      }


      Q:
      1.What is missing for complete solution?
      2.What is the algorithm that used by OIM to find default or non default resource bundle?
      3.How to change out-of-box validation messages? For a sample "The organization ABC does not exist." message is shown if non existing organization is provided during user creation and I'd like to have a different one.


      Regards
      Serge