Approving OIM/SOA requests using OIM 11g APIs

I'm creating a SOA request using createRequest method in RequestService OIM API. I would like to approve/reject the work items using the API as well but I don't see any methods to approve/reject the tasks. Is this something I would have to use SOA's webservices to do it?
Thanks

You need to use BPEL worklist API for the same.
http://technology.amis.nl/blog/1496/invoking-bpel-worklist-api-from-remote-server-with-java
http://docs.oracle.com/cd/E12839_01/integration.1111/e10224/bp_worklistcust.htm
-Bikash

Similar Messages

  • Approver for a request in OIM

    Hi ,
    I want to get the approver for the request using OIM api.Can u please suggest me how can I achieve that if I have have the request key.Or please suggest me how can I achive that..please provide me some sample code...
    Thanks.

    Hi buddy,
    here is so many ways you can find out approvers list in SRM . in SRM there is a badi where you creating approver list and some g table is there that having approvers names . because in each organization there some customization in SRM so you have to find out that table u can get it from approvers badi . so please check there......
    Thanks.
    Girish Goyal

  • Raising Request using OIM ApI's in oim 11g R2

    Hi all
    I trying to raise a request using OIM API in R2. I have written a sample code and it is throwing me the below error....
    Exception in thread "main" java.lang.NullPointerException
    *     at oracle.iam.ui.custom.updateuser.<init>(updateuser.java:76)*
    *     at oracle.iam.ui.custom.updateuser.main(updateuser.java:118)*
    Please take a look at my code....
    RequestEntityAttribute rea = null;
    rea.setName("Modify User Profile");//This is the place where i am getting the error...
    System.out.println("I am Here3");
    rea.setAction(RequestEntityAttribute.ACTION.Modify);
    List<RequestEntityAttribute> lrea = new ArrayList<RequestEntityAttribute>();
    lrea.add(rea);
    RequestEntity re = null;
    re.setEntityData(lrea);
    List<RequestEntity> reqentity = new ArrayList<RequestEntity>();
    reqentity.add(re);
    RequestData requestData = null;
    requestData.setJustification("I need this Role");
    requestData.setTargetEntities(reqentity);
    String str = null;
    try {
    str = _service.submitRequest(requestData);
    } catch (InvalidRequestException e) {
    } catch (InvalidRequestDataException e) {
    } catch (RequestServiceException e) {
    } catch (BulkBeneficiariesAddException e) {
    } catch (BulkEntitiesAddException e) {
    Thanks in Advance

    look at below link
    Creating a Request via OIM 11g API
    http://www.pathmaker-group.com/querying-oracle-iam-requests/

  • Creating self registration request using OIM API

    Hi guys,
    When we try to create a self regisrtation request using OIM API , we ge the following exception:
    We get this error when we set the following in Design console.
    Does user have to provide challenge information during registration = FALSE
    and passed an blank object in place of challenge question parameter in createSelfRegistrationRequest method in tcUtilityBaseClass.
    19:22:17,218 ERROR [REQUESTS] Error: Failed to save REQ_CONSOLIDATED_DATA_VALUE
    data for Create Entity.
    java.lang.NullPointerException
    at org.apache.xml.serializer.TreeWalker.dispatachChars(TreeWalker.java:2
    44)
    at org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:414)
    at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:143)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
    ormerIdentityImpl.java:389)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.convertNodeToXML
    (Unknown Source)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.addUser(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRequestForCreateEntity(Unkno
    wn Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.ejb.beansimpl.tcUnauthenticatedOperationsBean.createR
    egistrationRequest(Unknown Source)
    at com.thortech.xl.ejb.beans.tcUnauthenticatedOperationsSession.createRe
    gistrationRequest(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
    tatelessSessionContainer.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
    elessSessionInstanceInterceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    How do we create a self registration request , using OIM API , with and without challenge questions?

    Well try this piece of code. This might be similar to yours but it worked perfectly for me. For you the error might be the attribute names which you are passing, it should be the one dfined in the FormMetaData xml as below.
         import Thor.API.tcUtilityFactory;
         // define you class below
         ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
         final Hashtable env = config.getAllSettings();
         Hashtable quesAns = new Hashtable();
         HashMap user = new HashMap();
         user.put("Users.User ID", "SelfTesting");
         user.put("Users.First Name", "SelfTesting");
         user.put("Users.Last Name", "SelfTesting");
         user.put("Users.Email", "[email protected]");
         user.put("Users.Password", "SelfTesting");
         user.put("ConfirmPassword", "SelfTesting");
         tcUtilityFactory.createRegistrationRequest(env, user, quesAns);
    And for the query of challenge QnA, these are the following combinations possible:
    1) Property Does user have to provide challenge information during registration set to TRUE
    - During self-registration from web console, it will show you Challenge Questions section on the right. If you do not select any questions, it will thow you an error there itself.
    - Doing it from API will create no difference(even if you pass a blank HashTable). The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    2) Property Does user have to provide challenge information during registration set to FALSE
    - During self-registration from web console, it doesn't show you Challenge Questions section on the right. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    - Doing it from API, you will have to pass a blank HashTable as in above code. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    Hope it works.
    Thanks
    Sunny

  • Approving Self-Registration request using API

    Hi all
    As an end user I have created a self registration request using using the method, createRegistrationRequest from utility factory.
    Now as an approver , i wanted to approve the request. I have updated the Organization name using updateRegistrationUserDetails method in tcRequestOperationsIntf by passing
    hashMap.put("Organizations.Organization Name",
    "Requests");
    reqOper.updateRegistrationUserDetails(reqAppSet
    .getLongValue("Requests.Request ID"),hashMap);
    This is working fine. However when I use the following procedure to approve this request ,
    reqOper.setRequestResponse(reqAppSet
    .getLongValue("Requests.Key"), getUsrKey("XELSYSADM"), "Approve");
    it throws the following exception
    Thor.API.Exceptions.tcAwaitingApprovalDataCompletionException
    at com.thortech.xl.ejb.beansimpl.tcRequestOperationsBean.setRequestResponse(Unknown Source)
    at com.thortech.xl.ejb.beans.tcRequestOperationsSession.setRequestResponse(Unknown Source)
    What else needs to be done in this approving aspect for the task to be approved?
    Thank you
    Regards
    shashidhar

    Hi all
    I found the solution,
    along with this ,
    hashMap.put("Organizations.Organization Name",
    "Requests");
    you need to update ,
    Employee -Type and User Type
    Thank you
    shashidhar

  • Web Service  Stateless Session request using JDeveloepr 11g (JAX-RPC)

    I have been trying to consume web Service by sending Stateless Session request to the system.
    I generated the Java Proxy using JDeveloepr 11g, using JAX-RPC.
    As it is Stateless I need to add following SOAP Header for authentication
    <soap:Header>
    <wsse:Security soap:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>[email protected]</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
    token-profile-1.0#PasswordText">adminOnDemand</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    To do this I tried clientuntcredentialprovider as suggested by most of the post online, but found of little help as the server complained of not be able to find the User Name and Password.
    To add to the mess problem I hit was I was not able to View the SOAP Request or Response sent by JDeveloper hence not helping me in debugging the same
    I have tried it on XML SPY by manually adding SOAP Header to the SOAP request and was able to find the response, but I have not been able to do the same using the JDeveloper 11g IDE.
    I have tried HTTP Analyzer assuming it might help, but unfortunately due to the huge size of WSDL, tool hanged my PC each time I loaded it.
    I know it should be fairly straight forward but just feel like missing something.
    Has anybody has got this thing working ?
    Regards,
    Deepak

    What exactly you mean that since your request is stateless you must send a Username token?
    Also, can you put here the code you used to populate the UNT.
    Finally, if possible, can you zip and email your wsdl, the http analyzer should be able to handle wsdls, even if they are huge.
    Thanks,
    Vishal

  • Request Approval using OIM API

    Hi all
    Which API I need to use to approve a resouce request using OIM API?
    I have tried with the following:
    tcReqOp.setRequestResponse(85, 1 , "java.lang.String psResponse");
    i do not know what to pass in place of java.lang.String psResponse.
    I aslo tried passing "C","Completed"
    can anyone correct what I am doing?
    Thank u
    sas

    I assume you want to run a scheduled task for this. Try this approach. Run this query to retrieve specific approval tasks that are in a pending state:
    select oti.sch_key, mil.mil_name, to_char(oti.oti_update, 'dd-mon-yyyy hh24:mi:ss')
    from oti, mil, obj, pkg, orc, sch
    where oti.mil_key=mil.mil_key
    and oti.pkg_key=pkg.pkg_key
    and pkg.obj_key=obj.obj_key
    and oti.orc_key=orc.orc_key
    and oti.sch_key=sch.sch_key
    and oti.sch_status='P'
    and obj.obj_name='Test Object'
    and pkg.pkg_type='Approval'
    You can modify the obj.obj_name or remove, or do any changes you want. When you grab the time of the oti.oti_update, compare it against the sysdate to determine the time difference. If the update did not occur within that time, use this code:
    provIntf = (tcProvisioningOperationsIntf)getUtilityOps("Thor.API.Operations.tcProvisioningOperationsIntf");
    Hashtable taskHash = new Hashtable();
    taskHash.put("Process Instance.Task Details.Data", "<Insert Response Value Here>");
    provIntf.updateTask(key, taskHash) ; //---> Key is the same as the oti.sch_key field
    I have not tried this, but give it a shot.
    -Kevin

  • Creation of a Request in OIM 11G using API's

    Hi Friends,
    I am trying to create a request using OIM 11g API's.
    I am trying to do this for EBS Responsibility resource and this resource has a request dataset has EBS-IT-Resource-Instance, application name, responsibility name, start date and security group. Please note application name, responsibility name, start date and security group are in child form.
    I am trying to populate the request dataset using the below code.
    List<RequestBeneficiaryEntityAttribute> entityAttrList;
    RequestBeneficiaryEntity entity = null;
    entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    entity = new RequestBeneficiaryEntity();
    tcITResourceInstanceOperationsIntf tcITResourceIntf = Platform.getService(tcITResourceInstanceOperationsIntf.class);
    HashMap searchcriteria = new HashMap<String, String>();
    searchcriteria.put("IT Resources.Name", "EBSHF-APPS12");
    tcResultSet resultSet = tcITResourceIntf.findITResourceInstances(searchcriteria);
    long itResourceKey=resultSet.getLongValue("IT Resources.Key");
    entityAttrList.add(this.getAttrLong("eBusiness Suite Instance Name",itResourceKey));
    entityAttrList.add(this.getAttr("Application Name","3~300"));
    entityAttrList.add(this.getAttr("Responsibility Name", "3~300~52281"));
    entityAttrList.add(this.getAttr("Security Group", "3~0"));
    entity.setEntityKey(getResourceKey("Oracle eBusiness Responsibility"));
    entity.setEntityType(RequestConstants.RESOURCE);
    entity.setEntitySubType("Oracle eBusiness Responsibility");
    entity.setEntityData(entityAttrList);
    private RequestBeneficiaryEntityAttribute getAttr(String name, String value)
    RequestBeneficiaryEntityAttribute attr = null;
    attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.String);
    return attr;
    private RequestBeneficiaryEntityAttribute getAttrLong(String name, long value)
    RequestBeneficiaryEntityAttribute attr = null;
    attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.Long);
    return attr;
    My code is working fine and a request is getting created. But when I try to open the request dataset(object form) for the newly created request, I am getting null exceptions.
    If I did not populate the fields that are in the child form application name, responsibility name and security group which are highlighted above, then I am able to view the form with the correct IT-Resource-Instance name after request creation.
    So, I am thinking I am doing something wrong while populating child form data in the request dataset.
    Can you please provide me some code snippet to populate the child using 11G API'S?

    Hi Bikash,
    After referring your code, i made changes in mine. Here is my updated code.
    RequestBeneficiaryEntityAttribute parantAttr=null;
    List<RequestBeneficiaryEntityAttribute> entityAttrList;
    RequestBeneficiaryEntity entity = null;
    entity = new RequestBeneficiaryEntity();
    parantAttr=this.getAttrLong("eBusiness Suite Instance Name", itResourceKey);
    RequestBeneficiaryEntityAttribute mid1 = new RequestBeneficiaryEntityAttribute();
    List <RequestBeneficiaryEntityAttribute> childAttributesList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    childAttributesList.add(this.getAttr("Application Name", "3~555"));
    childAttributesList.add(this.getAttr("Responsibility Name", "3~555~22862"));
    childAttributesList.add(this.getAttr("Security Group", "3~0"));
    mid1.setChildAttributes(childAttributesList);
    mid1.setAction(RequestBeneficiaryEntityAttribute.ACTION.Add);
    entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    entityAttrList.add(parantAttr);
    entityAttrList.add(mid1);
    But when I try to run this, it is getting failed saying "RequestServiceException: IAM-2050033:Invalid attribute name null. No corresponding reference was found in the data set ProvisionResourceOracle eBusiness Responsibility".
    Here is my request data set for your reference.
    <AttributeReference name="eBusiness Suite Instance Name" attr-ref="eBusiness Suite Instance Name" type="Long" length="50" widget="itresource-lookup" required="true" available-in-bulk="true" itresource-type="eBusiness Suite UM"/>
    <AttributeReference available-in-bulk="true" length="10" widget="text" type="String" attr-ref="UD_EBH_RSCP" name="EBS HR Foundation User Responsibilities">
    <AttributeReference name="Application Name" attr-ref="Application Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Application' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    <AttributeReference name="Responsibility Name" attr-ref="Responsibility Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true" primary="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv,lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Responsibility' and lkv_encoded like concat('$Form data.Application Name','~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    <AttributeReference name="Security Group" attr-ref="Security Group" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.SecurityGroup' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    I am not sure why it is not referencing to the attribute. In your blog, it is saying your code is to set process form. But i am trying to create a request using API's. so, I need some code snippet to populate request dataset. Do you think, this will serve both?
    Thanks for your help.

  • Auto approval for self registration request in OIM 11G R2

    Hi all,
    We have a requirement where we want end users to be able to self-register without needing any sort of approval. We are using OIM 11G R2 with the latest patchset.
    The way to do it in 11G R1 is explained in the following document:
    [http://docs.oracle.com/cd/E21764_01/doc.1111/e14316/unauth_selfservice.htm#BABFEIBF]
    But now that R2 does not have any request templates, we are not sure how to do this. Any help will be greatly appreciated. Thanks for your time.
    -sandeepc

    refer this.
    Configuring Auto-Approval for Self-Registration - Fails due to Organisation

  • URGENT : Need java code snippet to retrieve uniquemember values OID 11g API

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

  • How to read approval tasks of a request in OIM using API ?

    Hi,
    Is there a way to read the approval tasks and the corresponding status using OIM API i.e., if workflow has two level of approvals, the approval tasks would be: 1. Manager Approval and 2. Role Owner approval ?
    I have been looking at the API docs. but it didnt help, all I could find is to read the stages and the status of each stage i.e., Request Level, Template Level and Operation Level?
    Thanks,
    Hrushikesh

    below link will help you to locate BPEL worklist API
    http://technology.amis.nl/blog/1496/invoking-bpel-worklist-api-from-remote-server-with-java
    http://docs.oracle.com/cd/E12839_01/integration.1111/e10224/bp_worklistcust.htm

  • How to get details of Pending Approval request in OIM 11g R2?

    Hi,
    We need to find out following details from Pending Approval Request in OIM 11g R2 -
    Request ID,Assignees,Requested Resource Name, Title of Request, Beneficiary, Status of Request.
    Out of above attributes we could find out Assignees, Title of Request, Status of Request, Beneficiary, etc. But we are not getting Request ID and Requested Resource Name.
    We have used API - 'IworkflowServiceClient'
    If we use API - 'RequestService' then we are not getting Assignees and Resource name from Pending approval request.
    Can any one suggeste how can we get these details? Do we need to use other API or other alternative to get all of attributes from Pending Approval Request.
    Thanks.

    Thanks Kevin for your suggestion.
    In OIM 11g R2 I tried task.getIdentificationKey() to get Request ID and task.getSystemMessageAttributes().getTextAttribute6() to get requested resource name but I am getting null values out of it. Is there something I am missing?
    Which common thing I can use to retrieve data from both OIM and SOAINFRA? As I am not getting Request ID from 'IworkflowServiceClient' API so I could not use it to earch request in OIM using 'RequestService'. Even if I have to use query what will be common thing I can use to fetch data from both tablespaces?
    Thanks.

  • Creating a Request via OIM 11g API

    I'm trying to create a request in OIM using the API. I found this post ( OIM 11g - Setting Process Form Data through Request API ) which has the code to do it but I'm getting an error:
    Here is what I have
    OIMClient client = getOIMClient(url, username, password);
          long resKey = 0L;
          String str = null;
          String resourceKey = null;
          Map<String, String> searchMap = new HashMap<String, String>();
          tcResultSet resultSet = null;
          RequestData requestData = null;
          Beneficiary beneficiary = null;
          RequestBeneficiaryEntity entity = null;
          List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
          List<RequestBeneficiaryEntity> entityList = null;
          List<RequestBeneficiaryEntityAttribute> entityAttrList = null;
          String RESOURCE = "TESTRESOURCE_GTC";
          tcITResourceInstanceOperationsIntf operations = client.getService(tcITResourceInstanceOperationsIntf.class);
          Map<String, String> conditions = new HashMap<String, String>();
          conditions.put("IT Resources.Name", "TESTRESOURCE_GTC");
          resultSet = operations.findITResourceInstances(conditions);           
          resKey = resultSet.getLongValue("IT Resource.Key");
          resourceKey = Long.toString(resKey);
          RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
          parantAttr.setType(TYPE.String);
          parantAttr.setName("Title");
          parantAttr.setValue("Mr.");
          entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
          entityAttrList.add(parantAttr);
          entity = new RequestBeneficiaryEntity();
          entity.setEntityKey(resourceKey);
          entity.setEntityType(RequestConstants.RESOURCE);
          entity.setEntitySubType(RESOURCE);
          entity.setEntityData(entityAttrList);
          entityList = new ArrayList<RequestBeneficiaryEntity>();
          entityList.add(entity);
          System.out.println("*********** USR KEY" + usrKey);
          beneficiary = new Beneficiary();
          beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
          beneficiary.setBeneficiaryKey(usrKey);
          beneficiary.setTargetEntities(entityList);
          beneficiaryList.add(beneficiary);
          requestData = new RequestData();
          requestData.setRequestTemplateName("Self-Request Resource");
          requestData.setJustification("Test");
          requestData.setBeneficiaries(beneficiaryList);
          UnauthenticatedRequestService reqsrvc = client.getService(UnauthenticatedRequestService.class);
          str = reqsrvc.submitRequest(requestData);
          System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");I'm getting
    <Feb 14, 2012 4:53:24 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050128> <Invalid beneficiary key was specified for Self-Request. >
    oracle.iam.request.exception.InvalidRequestDataException: IAM-2050128:Invalid beneficiary key was specified for Self-Request.
    I can see that USER KEY is getting populated.
    Edited by: DJ on Feb 14, 2012 4:59 PM
    Edited by: DJ on Feb 14, 2012 5:00 PM

    While creating a request to provision iPlanet User one of the errors I was getting:
    oracle.iam.request.exception.RequestServiceException: IAM-2050061:Type mismatch for the attribute Server. The type passed is String, but the corresponding type in the data set is Long.:Server:String:Long
    So I replaced the value of the attribute Server to the IT Resource.Key which is 5. After making the changes, it goes through approvals with no problems, but when I approve all the work items, it errors out with an error:
    Error occurred while provisioning resource with key 45 to user 5
    User Key is 45 and Resource Key is 5. I'm not sure why it swapped it.
    Here is the code I'm using:
    public static void createRequest(String userLogin, String templateName, String resourceName, HashMap<String, Object> attrs, OIMClient client) {
        try {
          String usrKey = searchUserByLogin(userLogin, client).get(0).getId();
          long resKey = 0L;
          String str = null;
          String resourceKey = null;
          Map<String, String> searchMap = new HashMap<String, String>();
          tcResultSet resultSet = null;
          RequestData requestData = null;
          Beneficiary beneficiary = null;
          RequestBeneficiaryEntity entity = null;
          List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
          List<RequestBeneficiaryEntity> entityList = null;
          List<RequestBeneficiaryEntityAttribute> entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
          tcITResourceInstanceOperationsIntf operations = client == null ? Platform.getService(tcITResourceInstanceOperationsIntf.class) : client.getService(tcITResourceInstanceOperationsIntf.class);
          Map<String, String> conditions = new HashMap<String, String>();
          conditions.put("IT Resources.Name", resourceName);
          resultSet = operations.findITResourceInstances(conditions);
          resKey = resultSet.getLongValue("IT Resource.Key");
          resourceKey = Long.toString(resKey);
          for (String attr : attrs.keySet()) {
            RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
            if (attrs.get(attr) instanceof String) {
              parantAttr.setType(TYPE.String);
              parantAttr.setName(attr);
              parantAttr.setValue(String.valueOf(attrs.get(attr)));
              entityAttrList.add(parantAttr);
            } else if (attrs.get(attr) instanceof Long) {
              parantAttr.setType(TYPE.Long);
              parantAttr.setName(attr);
              parantAttr.setValue(String.valueOf(attrs.get(attr)));
              entityAttrList.add(parantAttr);
            } else {
              // do nothing
          entity = new RequestBeneficiaryEntity();
          entity.setEntityKey(resourceKey);
          entity.setEntityType(RequestConstants.RESOURCE);
          entity.setEntitySubType(resourceName);
          entity.setEntityData(entityAttrList);
          entityList = new ArrayList<RequestBeneficiaryEntity>();
          entityList.add(entity);
          beneficiary = new Beneficiary();
          beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
          beneficiary.setBeneficiaryKey(usrKey);
          beneficiary.setTargetEntities(entityList);
          beneficiaryList.add(beneficiary);
          requestData = new RequestData();
          requestData.setRequestTemplateName(templateName);
          requestData.setJustification("Test");
          requestData.setBeneficiaries(beneficiaryList);
          System.out.println("Resource Keys " + resKey + " " + resourceKey);
          System.out.println("User Key " + usrKey);
          RequestService reqsrvc = client == null ? Platform.getService(RequestService.class) : client.getService(RequestService.class);
          str = reqsrvc.submitRequest(requestData);
          System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");
        } catch (Throwable t) {
          t.printStackTrace();
      }Edited by: DJ on Feb 16, 2012 5:01 PM

  • Error while creating authorisation policy using OIM 11g API

    Hi,
    We have a requirement to create ‘Authorization Policies’ (assign Data Constraints, Permissions & Assignments) using OIM 11g API’s.  I am using ‘oracle.iam.authzpolicydefn.api.PolicyDefinitionService & oracle.iam.authzpolicydefn.vo.AuthzPolicy’.  But when I am trying to attach Entity/Feature (User Management) to authorisation policy, it is throwing exception.  Below is the code snippet which I am trying to implement.
    Line1: PolicyDefinitionService policyService = oimClient.getService(PolicyDefinitionService.class);
    Line2: AuthzPolicy authPolicy = new AuthzPolicy();
    Line3: authPolicy.setName("Test Authz Policy");
    Line4: authPolicy.setDisplayName("Test Authz Policy Dsp Name");
    Line5: authPolicy.setDescription("Test Authz Policy Description");
    Line6: Feature feature = oimClient.getService(Feature.class);
    Line7: Action featureAction = feature.getAction(FeatureManagerConstants.Features.USER_MGMT.getId());
    Line8: List<Action> actions = new ArrayList<Action>();
    Line9: actions.add(featureAction);
    Line10: authPolicy.setActions(actions);
    Line11: policyService.createPolicy(authPolicy);
    Exception: oracle.iam.platform.utils.NoSuchServiceException: java.lang.ClassNotFoundException: oracle.iam.authzpolicydefn.api.FeatureDelegate
    The above exception is throwing at Line6.
    Let me know if anyone implemented.
    - Kalyan Mutya

    If you are using JDeveloper , can you able to get class after giving "." .If yes no than it is the problem with the jar file you are using .Check whether you can able to import oracle.iam.authzpolicydefn.api.Feature.
    Thanks ,
    Animesh anand

  • Getting error when rasing request in OIM using API

    Hi,
    I am getting the following error when I am trying to raise a request from outside OIM using OIM API's.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/persistence/indirection/ValueHolderInterface
         at accesspolicycreation.createRequestWeb.getAttr(createRequestWeb.java:183)
         at accesspolicycreation.createRequestWeb.createRequest(createRequestWeb.java:124)
         at accesspolicycreation.createRequestWeb.executeCreateRequest(createRequestWeb.java:199)
         at accesspolicycreation.createRequestWeb.main(createRequestWeb.java:66)
    Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.indirection.ValueHolderInterface
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    Please let me know how to fix this issue.
    Thanks

    Hi Rajiv,
    Thanks for the reply.
    I was able to solve the porblem by adding org.eclipse.persistence_1.1.0.0_2-1.jar in the classpath.
    Thanks

Maybe you are looking for

  • Labview 2009 x32 and x64 installation error on windows 7 x64

    When attempting to install the evaluation version of labview installed by clicking the try labview for free link on ni.com, I am experiencing an installation error. the full error is shown in the attachment below, and is as follows; The NI VC2005MSMs

  • Error in downloading data.

    Hi ALL, we are currently trying to schedule a background job for a program that triggers an xml output onto the application server. the program runs fine and the output is trigerred  when the program is made to run manually, but when it is scheduled

  • IP4 Charging..USB to PC (MAC) vs USB Wall Charger??

    Could there be a difference in the way the battery is recharged when charging the IP4 using a USB cable connected to a USB dock, which is connected to a Mac Mini vs charging the phone using the USB wall charger? Couple days ago my IP4 battery drained

  • WRT110 internet issues (HELP)

    1 connect with lan and 2 wireless connected to it. Every single time i try to connect the second wireless comp to the router, the internet Stop working. I have try reseting the cable modem and the router, the same problem occur. I have try ms dos rel

  • I hate icloud! How can i get rid of it and go back to only downloading movies to my pc and NOT to ICLOUD!!! grrrrr

    hi guys.... i hate icloud! i dont even remember setting it up! i dont want to use it. i just want to download movies and tv programmes to my PC and not to Icloud which it keeps doing. someone just help me!!! thank you