8 Replies Latest reply: Dec 12, 2011 9:32 AM by Rajiv Dewan RSS

    post-update entity adapter

    ejani
      Hello Guys,
      Every time enable the trigger post-update for an antity adapter, it makes my OIM server to crash, giving
      *"Segmentation Fault - core dumped"*

      I tried to make a simple entity adapter that sets a field value to a default leteral value "Default Value" and triggered it on post-update. Now when I update that value, from the web-console, my system crashes giving the error mentioned above.
      I think that enabling post-update trigger would put the entity adapter in a kind of loop, since it would be triggered by its own update. Is that right?

      Does anyone had this problem? Is anything that I am doing wrong?

      Regards,
      Eugert
        • 1. Re: post-update entity adapter
          BikashBagaria
          Try putting a condition in your adapter to update the field only if the field value is not "Default Value".The way I read it you are going in loops. Put some loggers and you can verify that.

          -Bikash
          • 2. Re: post-update entity adapter
            OIMLearner
            Don't play with post-update Entity adaptor , its going to infiny loop hence your system is getting crash.
            • 3. Re: post-update entity adapter
              Rajiv Dewan
              I have seen this issue with on Pre Update. Never heard on Post Update.

              I'll suggest go for Event Handler instead of Entity Adapter as in Entity Adapter you'll not get OLD VALUE of attribute. And put condition on OLD and NEW Value for more specific results.
              Put if (NEW VALUE == "Default Value" and OLD VALUE != "Default Value") then UPDATE else nothing.
              • 4. Re: post-update entity adapter
                ejani
                Hello Guys,
                Thank you for your collaboration. I am trying to verify if I go in a loop adding some logs as Bikash suggested.
                I would prefer the Event Handler way as Dewan suggested, since it would give you more control. The problem is that I dont know the plugin point, and the entity-type used for event handlers to post-process modifies done on the resources.
                I am using 11g version and all the guides I found are about extending user management with event handlers, and I haven't found one to guide me on extending resource management with event handlers. I first tried to use the event handlers giving "oracle.iam.platform.kernel.spi.EventHandler" as the plugin point and entity-type="ANY" operation="ANY", but the event handler never got trigered (the event handler code was simple, it writes a line to just to show the event is triggered). The event handler did get triggered when I created/modified a user, but never got triggered when I created/modified an account for a user. That's the reason I want for entity adapters then.
                But however I would gladly return to see the possibility of event handlers. Could you Dewan please provide me the plugin point and the entity-type, to achieve this if you have tried it before? I would also like to know how to access old-value with event handlers.
                Thank you in advance for your help

                Best regards,
                Eugert
                • 5. Re: post-update entity adapter
                  Rajiv Dewan
                  Dude
                  If you are doing in Process Form then why don't you create trigger in that case ?
                  No chances of looping
                  Better Performance

                  Enabling update for provisioned user in OIM11g
                  • 6. Re: post-update entity adapter
                    BikashBagaria
                    I think we had a thread before about this as well and again the same answer from me, there's no documentation about the plugins/eventhandlers on forms. ANY does not work on all as suggested by doc.

                    -Bikash
                    • 7. Re: post-update entity adapter
                      ejani
                      I had the idea that triggers would be triggered if a change is done on USR or ACT table. I my case the changes happens only on the account provisioned, so I using Lookup.USR_PROCESS_TRIGGERS will not help me. However I managed to break the loop of the post-entity adapter using the condition:

                      if <field-value> != "defalult value"
                      set field value = "default value"
                      else
                      return

                      Thank you for your continous collaboration guys. I have achieved a lot using your help on this forum.

                      Best Regards,
                      Eugert
                      • 8. Re: post-update entity adapter
                        Rajiv Dewan
                        Ok...


                        You can also create Updated Task if it satisfy your requirement.


                        Example:

                        You have a field say Test on Process Form so you can create Test Updated task as well and put some default value in some other field.