8 Replies Latest reply: Nov 18, 2012 9:28 PM by Nishith Nayan RSS

    Approval after Flatfile Target Recon

      Hi All,
      I have a requirement wherein I need to fetch a few columns via Flatfile target recon. These columns could be User ID, Employee Group and Lastlogin date. My requirement is to disable the IDs which have been inactive for more than 30 days. I need to do this using flatfile recon. Till now, I have managed to configure the recon. I have also written a code which fetches the process data (Target Recon) and returns a flag for dormant ids. The problem is with the approval process. I need to send these ids for approval before they are disabled in OIM. As per my understanding, approval process does not work for Target Recon. The recon simply fetches the data and updates it in OIM without considering the approval process for the same Recon Resource Object. Is there any way by which the approval process can be triggered after the Target Recon has run?

      Please suggest other ways of disabling such dormant ids with approval too.
        • 1. Re: Approval after Flatfile Target Recon
          Nishith Nayan
          you can use the assignment tab on process task for approval

          below step may helps

          1. assign the approver using Assignment tab of Disable user process task
          2. write a scheduled task to identify those id which has to be inactive/disable (calculate the inactive period based on last lonon attribute)
          3. call disable user task using scheduled task for those ids using API

          you can schedule this scheduler on 30 minute basis(or sync with target recon frequency and timing)
          • 2. Re: Approval after Flatfile Target Recon
            Thanks for the quick reply. How can I setup approval from the Assignment Tab? I guess you meant Assignment tab in one of the provisioning process tasks.
            Can you elaborate a bit more on this.
            • 3. Re: Approval after Flatfile Target Recon
              Nishith Nayan
              yes, I am referring to provisioning process task. In this case the task will be completed manually by approver
              • 4. Re: Approval after Flatfile Target Recon
                Hi Nishith,
                I have a few more doubts regarding this. I require 2 level approval for this. But in the assignment tab, OIM does not let you add more than one assignee. How do I assign multiple approvers in the task?

                And how do i call the disable user task in the scheduler? Should I write the disable User task in the Provisioning process of Flatfile recon?
                • 5. Re: Approval after Flatfile Target Recon
                  I have managed to write a schedular for the above requirement. I am not using flatfile recon anymore for this. i have written a custom scheduler which fetches user ID directly from the flatfile and validates the expiry date from UD_ADUSER. Now I know at this point which user needs to be disabled and which not.
                  But since I need an approval process before disabling the users, i would need to call the approval process for the dormant users from this schedular. I am not able to figure out how can an approval task be called from a Scheduler. Or is there a different way to call approval task after the approval task completes.
                  Since, scheduler method Execute() is a void method, I cannot return anything to set a status of the scheduler in the end. Please suggest ways of achieving this.
                  • 6. Re: Approval after Flatfile Target Recon
                    Hey guys,
                    Someone please help me with this...i have been trying to get this resolved for quite sometime now.
                    • 7. Re: Approval after Flatfile Target Recon
                      How do i call a process task or approval task from my custom scheduler. Can you suggest some api for this. A sample code would be of great help.
                      i am really running out of time on this one.
                      • 8. Re: Approval after Flatfile Target Recon
                        Nishith Nayan
                        use tcProvisioningOperationsIntf API.

                        public void addProcessTaskInstance(long plTaskKey,long plOrcKey)

                        plTaskKey - The key of the process task defined in process definition(nothing but MIL_KEY)
                        plOrcKey - The key of the process order instance

                        Use belo query to get MIL_KEY/plTaskKey before executing above method

                        String sqlquery="select mil.mil_key from mil,pkg,tos,obj " +
                        "where mil.mil_name = '<TASK_NAME>' " +
                        "and obj.obj_name='<RO NAME>' " +
                        "and obj.obj_key = pkg.obj_key " +
                        "and tos.pkg_key = pkg.pkg_key " +
                        "and mil.tos_key = tos.tos_key" ;

                        use below for db connection in oim 11g
                        Connection con=Platform.getOperationalDS().getConnection();
                        Statement st=con.prepareStatement(query);
                        ResultSet rs=st.executeQuery();
                        ong milkey=rs.getLong("mil_key");

                        similarly you can get the ORC_KEY and call this method for running process task using code. Make sure 'manual insert' and 'Allow Multiple' property is enabled for this task. if not do it using design console.