6 Replies Latest reply on Nov 8, 2012 1:54 AM by 904111

    how to find which role  from the Role Request

    904111
      Hello IDM experts, when a request for a role is submitted by a requester, inside the custom composite for approval process, I will get the request ID using OIM API. Now using this request ID, how do I get the name of the Role requested ?

      I know that we can get the beneficiary using OIM API and then we can obtain Role object. Is there any simpler way without going through beneficiary concept ? In my case, the requester will request only one Role at a time in the request (to keep it simple).

      Another thing is, there is getAttribute() method on Role class. But the API guide does not say what are these various attributes. Is there any guide which will tell us about these various attributes ?

      thank you for your great help.

      Edited by: Jyothi on Nov 4, 2012 7:11 PM
        • 1. Re: how to find which role  from the Role Request
          Nishith Nayan
          I have to find if there are any direct method for accessing role info.

          Probably below are the attribute returned by getAttribute method of RoleManager
          http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm

          verify in your code.
          • 2. Re: how to find which role  from the Role Request
            Nishith Nayan
            find below methods on Role object.
            http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm

            you can search role and then use these direct methods to get certain attribute

            unfortunately I don't see any direct method to get role information through request
            • 3. Re: how to find which role  from the Role Request
              904111
              My question is, how to get Role by having the request ID inside custom SOA composite !! In the example custom composite for approval process, I see that the embedded java code is retrieving requestId from the payload. But I do not know whether payload will have "Role name" also. !! Hope some OIM SOA expert will help me here.

              I have no idea what will be there in the payload. This is what given in the embedded java code in the example Custom SOA composite :

              Object reqIdXMLElem = getVariableData("inputVariable", "payload", "/ns3:process/ns4:*RequestID*");

              The reason I am asking is, if I come to know the Role name, the approval Role can be formed using this role name !!

              Example, if role name is "RoleA", then my approver will be "RoleA_APPROVER" ! So I can assign the request to RoleA_APPROVER in the custom SOA composite.



              thanks

              Edited by: Jyothi on Nov 4, 2012 7:37 PM

              Edited by: Jyothi on Nov 4, 2012 7:45 PM
              • 4. Re: how to find which role  from the Role Request
                BikashBagaria
                You will get the role name from the payload itself. In the payload as you are getting the requestId, similarly, you will get the object requested. In your case since you are requesting for the role, the payload will contain the role name. What you need to do it create a role request and then check the request from EM. In EM you will find the payload xml and there you can see the data being sent in the payload.
                I donot have a running environment for role now but I think the payload would contain all the attributes of the role even. So you can directly read off the "Owned By" attribute off the payload and assign the task to that user. If not, you can use OIM APIs to connect to OIM and read a lookup which contains this mapping or just append _APPROVERS as the name of the approver group.

                -Bikash
                • 5. Re: how to find which role  from the Role Request
                  Kevin Pinsky
                  If you go into the Enterprise Manager (port 7001/em on admin server), expand SOA, then your soa-infra for the server, then default, you will see all your soa-composites. Select the one you are using. Under recent instances, select one of the Instance IDs and it will open a popup. click the Approval Process link. Fro here, you will be able to see all of the different steps of the approval process. Under recieveInput, expand the payload.

                  Now you can see the whole payload, all the variables, and pull the information you need using the suggested techniques already stated.

                  -Kevin
                  1 person found this helpful
                  • 6. Re: how to find which role  from the Role Request
                    904111
                    Thanks a lot Bikash and Kevin . Great answers.

                    thank you very much for your support. Appreciate your time.