5 Replies Latest reply: Jan 9, 2013 8:25 AM by Sahar RSS

    passing paramters to plugin

    Sahar
      Hello All,
      OIM 11gR2,
      I have written a plugin and it is working fine.
      I want to be able to pass parameters to that plugin , best would be at run time , second best would be using some kind of parameter file .
      lets say i want to be able to pass parameters such as username / password for instance to be used by the plugin

      according to the documentation looks like I can use the plugin.xml for such but I could not understand how that should work if at all.


      thanks

      Sahar
        • 1. Re: passing paramters to plugin
          idamGod
          Hoping you created plugin for a schedule task.

          To pass parameters to this schedule task, you need to update event handler.xml not the plugin.

          sample event handler.xml to pass string and boolean parameters.
          <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
          <task>
          <name>LoadLookUpFromCSV</name>
          <class>OIM.ScheduleJobs.LoadLookupFromCSV</class>
          <description>Loading a Lookup table from a CSV file</description>
          <retry>5</retry>
          <parameters>
          <string-param required="true" helpText="CSV File Name with Full Path">CSV File Name with Full Path</string-param>
          <string-param required="true" helpText="Lookup Name to be loaded">Lookup Name to be loaded</string-param>
          <boolean-param required="true" helpText="Should the Lookup need to be archived before loading?">Archive Lookup</boolean-param>
          <string-param required="true" helpText="From whose email id, email should go">From Address</string-param>
          <string-param required="true" helpText="To whom the email should go">To Address</string-param>
          </parameters>
          </task>
          </scheduledTasks>
          • 2. Re: passing paramters to plugin
            Sahar
            thanks for the reply,
            I forgot to mention that this plugin is not for schedule task but to customize the username creation when new user created
            it runs by the plugin point .


            thanks

            S.
            • 3. Re: passing paramters to plugin
              Kevin Pinsky
              You can read information from wherever you want in the code of the plugin. You could read from a lookup, you can grab from a file, you could pull from a database table, anything you want so long as you code for it.

              -Kevin
              • 4. Re: passing paramters to plugin
                Sahar
                HI Kevin,

                thanks for your reply,
                i know I can read from any source I want inside the plugin ( after all is it is "just" a java class ...)
                I am looking for a way to read from somewhat "native" IDM source , not having to read from an external file,

                I will try to use oracle.iam.conf.api.SystemConfigurationService API to read a system property that I will add to the IDM configuration,
                I shall see if it works OK.
                I shall update the results,

                thanks

                S.
                • 5. Re: passing paramters to plugin
                  Sahar
                  Hi All,
                  thank you for your help.
                  I have managed to solve the issue by create some unique system properties and reading them via the plugin .

                  thanks

                  S,