5 Replies Latest reply: May 24, 2013 6:42 AM by idamGod RSS

    processReconciliationEvent Fails with MissingRequiredAttributeException

    user608228
      Hi,

      I have written the following code:

      HashMap dataMap = new HashMap();
      dataMap.put("Last Name","Richard");
      dataMap.put("Organization", 1L);
      dataMap.put("Role","EMP");
      dataMap.put("Xellerate Type", "End-User");

      long eventKey = reconService.createReconciliationEvent("Xellerate User", dataMap, new EventAttributes());
      reconService.finishReconciliationEvent(eventKey);
      reconService.processReconciliationEvent(eventKey);

      When I execute the code, even though I have set Organization I am getting following exception:
      oracle.iam.platform.entitymgr.MissingRequiredAttributeException: [act_key]


      Am I missing something?

      Thanks in advance.
        • 1. Re: processReconciliationEvent Fails with MissingRequiredAttributeException
          delhi
          Try adding:

          dataMap.put("act_key", 1L);

          See if it works then.

          Regards,
          Sunny
          • 2. Re: processReconciliationEvent Fails with MissingRequiredAttributeException
            user608228
            It is still throwing the same error:

            HashMap dataMap = new HashMap();
            dataMap.put("Last Name","TestRecon");
            dataMap.put("Organization", 1L);
            dataMap.put("act_key", 1L);
            dataMap.put("Role","EMP");
            dataMap.put("Xellerate Type", "End-User");

            Thanks.
            • 3. Re: processReconciliationEvent Fails with MissingRequiredAttributeException
              idamGod
              Try this, It should work.

              HashMap dataMap = new HashMap();
              dataMap.put("Last Name","TestRecon");
              dataMap.put("User Role", "EMP");
              dataMap.put("User Organization Name", "Xellerate Users");
              dataMap.put("User Type", "End-User");

              ReconOperationsService reconServiceObject = Platform.getService(ReconOperationsService.class);
              long reconEventKey = reconServiceObject.createReconciliationEvent("Xellerate User", dataMap, true);
              reconServiceObject.processReconciliationEvent(reconEventKey);
              • 4. Re: processReconciliationEvent Fails with MissingRequiredAttributeException
                user608228
                Hi Srini,

                Sorry missed providing this detail, I am on 11g R2 and createReconciliationEvent accept EventAttribute as a parameter, finishevent parameter which is boolean is deprecated.

                Also, using your code throws following error:

                Caused by: oracle.iam.platform.entitymgr.MissingRequiredAttributeException: [Role, act_key]
                     at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.checkRequired(EntityManagerImpl.java:1510)
                     at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.createEntity(EntityManagerImpl.java:265)
                     at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.createEntity(EntityManagerImpl.java:241)
                     at sun.reflect.GeneratedMethodAccessor1627.invoke(Unknown Source)


                Thanks
                • 5. Re: processReconciliationEvent Fails with MissingRequiredAttributeException
                  idamGod
                  In that case use the below code.

                  ReconOperationsService reconServiceObject = Platform.getService(ReconOperationsService.class);
                  HashMap<String,Object> reconUserMap = new HashMap<String,Object>();
                  reconUserMap.put("First Name", "Demo109");
                  reconUserMap.put("Last Name", "Demo109");
                  reconUserMap.put("Xellerate Type", "End-User");
                  reconUserMap.put("Username", "Demo109");
                  reconUserMap.put("User Password", "Abcd1234");
                  reconUserMap.put("Role", "EMP");
                  reconUserMap.put("Organization", "Xellerate Users");
                  EventAttributes eventattr= new EventAttributes();
                  eventattr.setEventFinished(true);

                  long reconEventKey = reconServiceObject.createReconciliationEvent("Xellerate User", reconUserMap, eventattr);
                  System.out.println(" reconEventKey : "+reconEventKey);
                  try {
                  reconServiceObject.processReconciliationEvent(reconEventKey);
                  System.out.println(" Finish Recon Event ");
                  reconServiceObject.finishReconciliationEvent(reconEventKey);
                  } catch (tcAPIException e) {
                  e.printStackTrace();
                  } catch (tcEventNotFoundException e) {
                  e.printStackTrace();
                  } catch (tcEventDataReceivedException e) {
                  e.printStackTrace();
                  }