7 Replies Latest reply: Feb 14, 2013 1:18 PM by user8663548 RSS

    Configuring Auto-Approval for Self-Registration - Fails due to Organisation

    Maddyvinz-Oracle
      Hi,

      My use case is to set Auto-Approval for Self-Registration.

      I created a Approval Policy for "Operation Level" with Auto Approve checkbox checked.

      After this, Only Request Level Approval was triggered during Self Registration, during which Approver can Manually enter the field "Organization"

      Now to avoid the Request Level Approval, I added an approval policy for "Request Level" with Auto Approve checkbox checked.

      But I started getting error after Self user Registration. Stack trace mentioned below.
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
           at java.util.ArrayList.RangeCheck(ArrayList.java:547)
           at java.util.ArrayList.get(ArrayList.java:322)
           at oracle.iam.requestactions.approval.operationlevel.OrgBasedMethodology.getOrgDetails(OrgBasedMethodology.java:215)
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      The error is due to the fact that Organization, field going Null.

      I have read lot of articles/forum how to pass the value. But all are related to Release 1.

      Specific inputs from 11gR2 is required? Kindly help.

      Edited by: maddyvinz on Feb 9, 2013 1:03 AM
        • 1. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
          idamGod
          Are you submitting self-registration request using API or thru console.

          If it is thru API, you need to submit self-registation request by populating org name as well.

          If you are submitting it thru console, customize self registration page to have organization name field also.

          Please see the below url to customize self registration request.

          http://kinisblog.blogspot.com/2012/10/oim-11gr2-customizing-self-service-user.html
          • 2. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
            Maddyvinz-Oracle
            Hi,

            I am submitting the request through console.

            I have customized the register page and added Organization field. Steps followed is documented in the below blog of mine.

            http://idmlearn.blogspot.com/2013/02/passing-value-for-organization-field.html

            But the value entered in Register page is not passed to the request details.

            I tried the same by adding "Organization Name" field with similar results.

            Edited by: maddyvinz on Feb 11, 2013 3:25 AM
            • 3. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
              Maddyvinz-Oracle
              Tried two more approaches, but still not successful.



              metadata/iam-features-requestactions/model-data/SelfCreateUserDataset.xml

              Old Value:
              <AttributeReference name="Organization" attr-ref="act_key" type="Long" widget="ENTITY" length="256" required="false" available-in-bulk="false" entity-type="ORGANIZATION"/>


              Approach 1: Populate the data using the lookup query, similar to field “User Name Preferred Language”

              New Value:

              <AttributeReference name="Organization" attr-ref="act_key" type="Long" widget="lookup-query" length="256" required="false" available-in-bulk="false">
              <lookupQuery lookup-query="select act_key from ACT where ACT_UPN = 'System Requests'" display-field="act_key" save-field="act_key"/>
              </AttributeReference>


              Approach 2: Populate the data using PrePopulationAdapter

              New Value:

              <AttributeReference name="Organization" attr-ref="act_key" type="Long" widget="ENTITY" length="256" required="false" available-in-bulk="false" entity-type="ORGANIZATION">
              <PrePopulationAdapter name="OrgPrepopulateAdapter" classname="oracle.iam.selfservice.uself.uselfmgmt.plugins.OrgPrepopulateAdapter"/>
              </AttributeReference>


              ------------------------------------------------------------------------------------------------------------------
              OrgPrepopulateAdapter.java is given below:


              package oracle.iam.selfservice.uself.uselfmgmt.plugins;

              import java.io.Serializable;
              import oracle.iam.request.exception.RequestServiceException;
              import oracle.iam.request.plugins.PrePopulationAdapter;
              import oracle.iam.request.vo.RequestData;

              public class OrgPrepopulateAdapter
              implements PrePopulationAdapter
              {

              public OrgPrepopulateAdapter()
              {
              }


              public Serializable prepopulate(RequestData x0)
              throws RequestServiceException
              {
                        long org = 2;
              return org;
              }
              }
              • 4. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
                idamGod
                I noticed one thing in your screenshot.

                http://idmlearn.blogspot.com/2013/02/passing-value-for-organization-field.html

                You gave requests as the organization while registering new user.

                A user can not come under requests organization.
                Did you try by giving 1 (for Xellerate Users)?
                • 5. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
                  Maddyvinz-Oracle
                  Hi,

                  I tried with "Xellerate Users". But still failing in Auto Approval.

                  please check the steps followed in the blog.

                  http://idmlearn.blogspot.com/2013/02/passing-value-for-organization-field_12.html
                  • 6. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
                    Maddyvinz-Oracle
                    Hi,

                    I noticed the following Error in the Logs

                    -----------------------------
                    [2013-02-13T12:28:09.671+05:30] [oim_server1] [ERROR] [] [oracle.iam.configservice.impl] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: e171ff3c1743d36a:3d6fe6e5:13cd24b87da:-8000-0000000000000139,0] [APP: oim#11.1.2.0.0] The attribute organizationName does not exist!
                    [2013-02-13T12:28:09.702+05:30] [oim_server1] [ERROR] [] [oracle.iam.ui.formservice.model.modeler.FormService] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: e171ff3c1743d36a:3d6fe6e5:13cd24b87da:-8000-0000000000000139,0] [APP: oracle.iam.console.identity.sysadmin.ear#V2.0] Updating User field organizationName with params: {IsMultiselectPicklist=false, Indexed=false, oimEncrypted=false, AvailableMasterObjects=oracle.jbo.server.ViewRowSetImpl@192ddd15, Type=Text, AdditionalListSearchAttributes=[], DefaultValue=Xellerate Users, Searchable=false, UpdatableFlagFriendlyNames=oracle.jbo.server.ViewRowSetImpl@19b1dbf7, AdditionalListDisplayAttributes=[], CheckboxDefaultValue=Y, ParentChoiceListAttributeList=oracle.jbo.server.ViewRowSetImpl@192ddfb0, TimeZoneOptions=oracle.jbo.server.ViewRowSetImpl@192dddb1, isChildForm=null, Updateable=true, voName=sessiondef.oracle.iam.ui.runtime.form.model.user.view.userVO, DisplayTypeOptions=oracle.jbo.server.ViewRowSetImpl@192dde55, LOVViewAttributeList=oracle.jbo.server.ViewRowSetImpl@192ddbdb, ldapSyncAttrName=null, AdditionalLookupAttrsList=oracle.jbo.server.ViewRowSetImpl@19254f8f, ApiName=lov_ds_act_key__c, oimBulkUpdate=false, LookupTypes=oracle.jbo.server.ViewRowSetImpl@19b1dc74, BooleanValues=oracle.jbo.server.ViewRowSetImpl@192de0f1, DependencyAttributes=[], isCascadingPicklistAllowed=false, Name=lov_ds_act_key, attributeName=lov_ds_act_key__c, eoName=sessiondef.oracle.iam.ui.runtime.form.model.user.entity.userEO, Required=false, ResetDependencyAttributes=[], IsExpression=false, isCascadingPicklist=false, DisplayLabel=Organization, Length=254, ActiveObjectFullName=sessiondef.oracle.iam.ui.runtime.form.model.user.view.userVO, CheckBoxValues=oracle.jbo.server.ViewRowSetImpl@192de059, oimRefAttrName=organizationName, PageFlowId=/WEB-INF/oracle/iam/ui/formservice/tfs/system-custom-udf-attribs-tf.xml#system-custom-udf-attribs-tf, LookupValuesByLookupType=oracle.jbo.server.ViewRowSetImpl@192ddef6, DisplayWidth=40, DataTypeRegistry=oracle.jbo.server.ViewRowSetImpl@192ddb3b, OnlyDataTypes=oracle.jbo.server.ViewRowSetImpl@192ddc74} failed
                    ---------------------------
                    Some error occurred while updating the Default value for organization., due to which i am getting error in Auto Approval.
                    • 7. Re: Configuring Auto-Approval for Self-Registration - Fails due to Organisation
                      user8663548
                      Hi. I am using the API to submit a self reg request in OIMR2. It works with default the "Self-Register User" template which you have to pass in when calling unauthenticatedSelfService.submitRegistrationRequest. The next step is to customize the template so I can pass in a custom attribute. What are the steps to make that happen? I believe one still has to modify the SelfCreateUserDataset.xml file in MDS to add a new attribute?