IBM Security Verify

 View Only
  • 1.  IGI - Collect data from HR and manipulate value

    Posted Tue December 07, 2021 11:59 AM
    Dear experts,

    Let me start by saying that I'm not a java programmer, I would like to understand if it could be possible to perform the following while interfacing an HR System:

    • from JDBC we collect the Org_Unit field (i.e. organizational unit) of Users (e.g. PRC-PR) > OK
    • we map Org_Unit field with IGI filed OU and ATTR1 > OK
    • Question: Could it be possible to create a rule to manage a new IGI field like ATTR2 populating that with: get only the first 3 letter of Org_Unit field?
    Just to be more clear the intention would be to have the following :

    HR System IGI
    Code Org_Unit Master UID OU ATTR2
    User 1 PRC-PR User 1 PRC-PR PRC
    User 2 P/PRC User 2 P/PRC PRC

    to calculate ATTR2.

    Thanks in advance.


    ------------------------------
    Andrea Martone
    ------------------------------


  • 2.  RE: IGI - Collect data from HR and manipulate value

    Posted Tue December 07, 2021 12:46 PM
    Edited by David Kuehr-McLaren Tue December 07, 2021 02:11 PM
    Andrea, 

    Short answer, this can be done from a rule on the IN Queue. If I remember correctly, you need to use the UserErcBean() bean. You will need the rule on the Create Events and the Modify Events. The Modify is a bit more complicated, because you should check to see if the OU has changed before updating ATTR2.  If you allow the admins to manually change the OU in the admin UI, then you will add a rule to the the Internal Queue, as well.  I will try to find you an example. 

    David

    ------------------------------
    David Kuehr-McLaren
    ------------------------------



  • 3.  RE: IGI - Collect data from HR and manipulate value

    Posted Tue December 07, 2021 02:16 PM
    Here is an AS-IS (I did not test this) Rule for the Live Events->IN->Create User rule flow.

    //These imports go in the Package Imports section of the Create user Rule Flow
    import com.engiweb.logger.ILogger
    import com.engiweb.logger.impl.Log4JImpl
    import com.engiweb.pm.entity.BeanList
    import com.engiweb.profilemanager.common.bean.event.EventBean
    import com.engiweb.profilemanager.common.bean.event.EventInBean
    import com.engiweb.profilemanager.common.bean.ExternalInfo
    import com.engiweb.profilemanager.common.bean.OrgUnitBean
    import com.engiweb.profilemanager.common.bean.OrgUnitErcBean
    import com.engiweb.profilemanager.common.bean.UserBean
    import com.engiweb.profilemanager.common.bean.UserErcBean
    import com.engiweb.profilemanager.common.bean.UserExtInfoBean
    import com.engiweb.profilemanager.common.ruleengine.action.OrgUnitAction
    import com.engiweb.profilemanager.common.ruleengine.action.reorganize._RightsAction
    import com.engiweb.profilemanager.common.ruleengine.action.reorganize._UserAction
    import com.engiweb.profilemanager.common.ruleengine.action.UserAction
    import com.engiweb.profilemanager.common.ruleengine.action.UtilAction
    import com.engiweb.ruleengine.common.bean.ContainerBean

    global com.engiweb.profilemanager.backend.dao.db.SQLH sql
    global com.engiweb.logger.impl.Log4JImpl logger
    // End imports

    when
       event : EventInBean( )
       userErcBean : UserErcBean( )
       userBean : UserBean( )
       extInfoBean : ExternalInfo( )
       orgUnitBean : OrgUnitBean( )
    then
       logger.info("Begin My Custom Rule");
       String ou = (String) userErcBean.getAttribute("OU");
       logger.info("ou is: " + ou);
       String ouCode = ou.substring(3);
       userErcBean.setAttribute("ATTR2", ouCode);
       logger.info("ATTR2 set to: " + ouCode);
       logger.info("Exit My Custom Rule");

    ------------------------------
    David Kuehr-McLaren
    ------------------------------



  • 4.  RE: IGI - Collect data from HR and manipulate value

    Posted Wed December 08, 2021 03:47 AM
    Dear David,

    many thanks for you help!

    I will test it asap, and i will let you know! That is also really relevant to me to understand something about coding. 




    ------------------------------
    Andrea Martone
    ------------------------------



  • 5.  RE: IGI - Collect data from HR and manipulate value

    Posted Thu December 16, 2021 08:11 AM
    Dear David,

    sorry for my late reply i was completely busy with other stuff... at the moment it seems that it's not working but I just tried two times, so i probably need to better check. I'll keep you posted ;) Thanks again.

    ------------------------------
    Andrea Martone
    ------------------------------