Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/29/2024 06:12 AM - edited 07/29/2024 06:13 AM
Hello,
I am currently working on a requirement to handle cross-country moves for employees in our HCM system. Specifically, we need to detect when an employee's country changes and then trigger the joiner process accordingly.
Here’s the scenario and our current setup:
Identification: We use customproperty21 (PerId) to identify if the user exists.
HCM Systems: We have 5 different HCM systems (customproperty4) for different countries. Moving an employee to another country means creating a new employee record, which is more akin to a JOINER PROCESS.
Cross-Country Move Detection:
PerId Check: Saviynt can detect if this person already exists in a different country using users.CUSTOMPROPERTY21.
HCM System Check: If the HCMSystem (users.usersource) changes, it indicates a cross-country move.
Approach:
I initially thought I could handle this process in the MODIFYUSERDATAJSON of the HCM connection with the following queries:
"UPDATE NEWUSERDATA NU SET NU.is_cross_country_move = CASE WHEN (SELECT COUNT(1) FROM CURRENTUSERS CU WHERE CU.customproperty21 = NU.customproperty21 AND CU.customproperty4 <> NU.customproperty4) > 0 THEN 'Y' ELSE 'N' END",
"UPDATE NEWUSERDATA NU SET NU.customproperty25 = CASE WHEN NU.is_cross_country_move = 'Y' THEN 'CROSS_COUNTRY_MOVE' ELSE NU.customproperty25 END"
However, I am not sure how this would trigger the joiner process or actually make the necessary changes.
Alternative Approach:
Another approach I considered was using workflows. I created a workflow as shown in the screenshot. When I tried to add an Action Event, it required a Java class to be created. Do you think this could be a good method?
and for the joiner process i already have user update rule.
Current User Update Rule:
a.customproperty5 = 'A'
AND a.statuskey = 1
AND (##a.customproperty5 is updated##)
AND (##a.statuskey is updated##)
i would add:
a.customproperty5 = 'A'
AND a.statuskey = 1
AND (##a.customproperty5 is updated##)
AND (##a.statuskey is updated##)
AND a.customproperty25 = 'CROSS_COUNTRY_MOVE'
AND (##a.customproperty25 is updated##)
so, Is the proposed rule update correct and efficient for detecting cross-country moves?
Are there any better approaches or best practices to handle this scenario?
Does the Groovy script and workflow setup look correct for triggering the joiner process?
I would greatly appreciate any insights, suggestions, or examples from those who have handled similar requirements.
Thank you!
07/29/2024 06:58 AM
07/29/2024 07:00 AM - edited 07/29/2024 07:01 AM
applying the requirement in the MODIFYUSERDATAJSON wouldn't be possible? and also so you think this is the only way to implement it ?
also can you please explain what do you mean with i can'T use groovy code in workflow, it was specified as groovy .. like one option only (groovy)
07/29/2024 07:10 AM
T NU.is_cross_country_move