Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

HCM-Status is set to "I" but the "Paused Started Date" is not cleared

Roua
Regular Contributor
Regular Contributor

Hello,

I have a requirement where, when the HCM-Status is set to "I", the "Paused Started Date" (which we have mapped to customproperty6) should automatically be cleared and set to empty.

How can we ensure that when the HCM-Status is "I", the Paused Started Date attribute (customproperty6) is empty by default? I've tried implementing this using a user update rule, but since custom actions cannot be used, I'm unable to specify that CP6 should be cleared. is this needs to be handled specifically in a SAVtoSAV connection?

This issue also occurs in other scenarios when we change a mapping to a different custom property (CP). After the import, the old CP value is not cleared automatically, and we end up doing it manually. What could be causing this problem, and how can we resolve it?

Roua_0-1723648543790.png

 

 

29 REPLIES 29

rushikeshvartak
All-Star
All-Star
  • You can handle same from preprocessor in user import job
  • or from User update rules - call update user action

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Roua
Regular Contributor
Regular Contributor

Thank you, could you please explain the following, basically i created a user update rule but how do i set the action to clear the "customproperty6 " which is paused start date

Roua_0-1723794900844.png

 

NM
Honored Contributor II
Honored Contributor II

Hi @Roua ,

Select update login as an option then attach a connection to the user update rule .

In the connection handle our use case to remove the cp6 value using rest API

Roua
Regular Contributor
Regular Contributor

Thank you @NM ,
i did as you recommended,
i have a connection for the HCM system and AD already and i have these two jobs for it 

In updateuserjson in AD:

"customproperty6": "${if(user.customproperty5 == 'P' || user.customproperty5 == 'I'){''} else {user.customproperty6}}",

in MODIFYUSERDATAJSON in HCM:

"UPDATE NEWUSERDATA NU SET NU.customproperty6 = NULL WHERE NU.customproperty5 IN ('P', 'I')",
the jobs for HCM
Roua_0-1723806957166.png

Roua_1-1723806970343.png

after changing the status to I 
this triggered the user update rule and created tasks
and after running the past jobs it still didn't work and the tasks are there.

Roua_0-1723808756283.png

i have a similar issue with the opposite that the accounts deactivated and the pause start date is set to current day, the tasks for AD / LDAP work after running the provisioning Jobs but for the users it doesn't and the date also won't be set.

can you please explain to me what is the wrong step / concept here? how to deal with it ? 

 

NM
Honored Contributor II
Honored Contributor II

Hi @Roua , if you want to update customproperty of saviynt to blank .. attach a saviynt rest connection will blank the value.

Using an HCM connection won't work.

NM
Honored Contributor II
Honored Contributor II

@Roua If you have already handled it scenario via preprocessor you don't need to have a seperate user update rule

It will automatically update the customproperty 6 value to null(if it doesn't try '' only)

And then create a update account task for AD application and AD prov job while take care of it.

Roua
Regular Contributor
Regular Contributor

so you basically you mean to make remove the value of any attribute i should connect it to saviynt for saviynt connection? 
for example another case:
Mapping something from HCM/AD to a certain CP for example CP2 and then changing the mapping to CP3
CP2 will still hold the same value even if CP3 is updated after running the job? because i also encountered this, there is no way for it to just be empty since we removed CP2 from the mapping for example? 


another question could you please explain to me the concept of the update via login update user task ? 
since it created a task, how can i let this task be resolved? not manually but through running JOBS just like i run for example provisioning Job for AD and task is resolved how does it work for this user update task ? it is a bit unclear for me? and although the AD and LDAP task was resolved the update user task is still unresolved.


another thing, basically removing the value OR assigning the value of customproperty 6 the pause start date must be by creating a saviynt for saviynt connector ?

Thank you so much for your time and explaining 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Honored Contributor II
Honored Contributor II

@Roua ,

1) changing mapping will not make the old property empty you have to explicitly pass null or empty value.

 

2) to complete a user update task ... Create a prov job choose tasktype as user update and nothing else.

3) you can do it via preprocessor or via user update rule by using saviynt for saviynt rest connection.

Roua
Regular Contributor
Regular Contributor

Hello @rushikeshvartak , @NM ,

Thank you so much for your explanation.

Here’s what I’ve understood, please correct me if I'm wrong:

- If I change the value of a custom property (CP) to a different CP, I need to clear the old CP value manually or only by using a Sav-to-Sav connector. therefore it is not automatically done by saviynt.

- In my case, if I want the "Paused Start Date" to be empty, I could use a Sav-to-Sav connector along with a user update rule. However, since I'm not using a Sav-to-Sav connector, I don’t need a user update rule. Instead, I am clearing the value directly from the preprocessor in the HCM and AD connections:

In updateuserjson (AD):

"customproperty6": "${if(user.customproperty5 == 'P' || user.customproperty5 == 'I'){''} else {user.customproperty6}}",

In MODIFYUSERDATAJSON (HCM):

"UPDATE NEWUSERDATA NU SET NU.customproperty6 = NULL WHERE NU.customproperty5 IN ('P', 'I')",

And this should be sufficient to clear the value of customproperty6.

- Finally, to process a user update task, I need to create a wsretry job with the task type set as "update user."



i created the job and the results are: 

Roua_0-1724059773653.png



they failed but i couldn't find any error message nor in the logs..
it is correct that there are 4 pending tasks : 

Roua_1-1724059878153.png

 

  • If I change the value of a custom property (CP) to a different CP, I need to clear the old CP value manually or only by using a Sav-to-Sav connector. Therefore, it is not automatically done by Saviynt. 

    • Correct
  •  

    In my case, if I want the "Paused Start Date" to be empty, I could use a Sav-to-Sav connector along with a user update rule. However, since I'm not using a Sav-to-Sav connector, I don’t need a user update rule. Instead, I am clearing the value directly from the preprocessor in the HCM and AD connections:

    • Correct
  • Share job configuration and Connection User Update JSON configured

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Roua
Regular Contributor
Regular Contributor

thank you for your answe @rushikeshvartak ,

MODIFYUSERDATAJSON HCM connection

Spoiler
{
"ADDITIONALTABLES": {
"USERS": "SELECT customproperty2, customproperty11, customproperty9, lastname, firstname, departmentname, employeeType, Orgunitid, customproperty4, country, statuskey, customproperty6, customproperty5, username, startdate, enddate, customproperty3, manager, customproperty14, customproperty28, customproperty21, userkey, customproperty13, customer, secondaryManager, owneronterminate, customproperty30, owner FROM USERS",
"CUSTOMER": "SELECT customername FROM customer"
},
"COMPUTEDCOLUMNS": [
"customproperty2",
"customproperty11",
"customproperty9",
"displayname",
"Orgunitid",
"username",
"statuskey",
"customproperty6",
"startdate",
"customer",
"enddate",
"statuskey",
"manager",
"customproperty3",
"customproperty14",
"customproperty15",
"customproperty13",
"secondaryManager",
"userkey",
"owneronterminate",
"customproperty30"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA NU SET NU.customproperty2 = DATE_FORMAT(STR_TO_DATE(NU.customproperty2, '%Y%m%d'), '%d.%m.%Y')",
"UPDATE NEWUSERDATA NU SET NU.customproperty11 = CASE WHEN NU.customproperty11 = '00000000' THEN NULL ELSE DATE_FORMAT(STR_TO_DATE(NU.customproperty11, '%Y%m%d'), '%d.%m.%Y') END",
"UPDATE NEWUSERDATA NU SET NU.customproperty9 = CASE WHEN NU.customproperty9 = '00000000' THEN NULL ELSE NU.customproperty9 END",
"UPDATE NEWUSERDATA NU SET NU.displayname = CONCAT(UPPER(NU.lastname), ' ', NU.firstname, ' (', NU.displayname, IF(NU.employeeType = 'E', ' (EXT)', ''), ')')",
"UPDATE NEWUSERDATA NU SET NU.Orgunitid = CONCAT(NU.customproperty4, '-', NU.Orgunitid, '')",
"UPDATE NEWUSERDATA NU SET NU.username = CONCAT(NU.country, NU.username) WHERE NU.username NOT LIKE CONCAT(NU.country, '%')",
"UPDATE NEWUSERDATA NU SET NU.manager = CONCAT(NU.country, NU.manager)",
"UPDATE NEWUSERDATA NU SET NU.customproperty30 = CONCAT(NU.country, NU.customproperty30)",
"UPDATE NEWUSERDATA NU SET NU.secondaryManager = NU.customproperty30",
"UPDATE NEWUSERDATA NU SET NU.statuskey = CASE WHEN NU.customproperty5 IN ('P', 'A') THEN 1 WHEN NU.customproperty5 = 'I' THEN 0 END",
"UPDATE NEWUSERDATA NU SET NU.customproperty6 = NULL WHERE NU.customproperty5 IN ('P', 'I')",
"UPDATE NEWUSERDATA NU SET NU.startdate = DATE_FORMAT(STR_TO_DATE(NU.startdate, '%Y%m%d'), '%b %d, %Y')",
"UPDATE NEWUSERDATA NU SET NU.enddate = DATE_FORMAT(STR_TO_DATE(NU.enddate, '%Y%m%d'), '%b %d, %Y')",
"UPDATE NEWUSERDATA NU SET NU.customproperty3 = NU.username",
"UPDATE NEWUSERDATA NU SET NU.customer = (SELECT customername FROM currentcustomer WHERE currentcustomer.CUSTOMERNAME = NU.Orgunitid)",
"UPDATE NEWUSERDATA NU SET NU.OWNERONTERMINATE = CASE WHEN NU.manager IS NOT NULL THEN NU.manager ELSE '' END",
"UPDATE NEWUSERDATA NU SET NU.customproperty14 = CASE WHEN NU.customproperty15 = '50404368' THEN 'Poolberater' WHEN NU.customproperty15 = '4365136854' THEN 'Projektberater' WHEN NU.customproperty15 = '65218564' THEN 'Fachberater' ELSE NULL END",
"UPDATE NEWUSERDATA NU SET NU.customproperty13 = CONCAT(NU.customproperty13)"
]
}

UPDATEUSERJSON:

Spoiler
{
"customproperty6": "${if(user.customproperty5 == 'P' && user.statuskey == 1){currentDate} else if(user.customproperty5 == 'I'){user.customproperty6} else {''}}"
}

this is Handling two requirements: 
When the HCM-Status is I the Paused Started Date (customproperty6) is set and not cleared.
and
HCM Status is set to 'P' -> Identity is set to status 'Active' -> The users.CUSTOMPROPERTY6 contains todays date -> All accounts are disabled.


 

Roua_0-1724064327955.png

 

Roua
Regular Contributor
Regular Contributor

@NM ,
hello, no matter what kind of UPDATE USER TASK is created nothing it won't be completed with the following job, do you have any idea why? or what am i missing in the process? 

Roua_0-1724402307409.png

Roua_1-1724402401184.png

 




NM
Honored Contributor II
Honored Contributor II

Hi @Roua click show more options under task type select update user. 

Roua
Regular Contributor
Regular Contributor

@NM , you mean here when i create it in user update rule? yes i do have it like this:

Roua_1-1724402719769.pngRoua_2-1724402784415.png

 

 

Roua_0-1724402700370.png

 

NM
Honored Contributor II
Honored Contributor II

@Roua in the wsretry job you will see an option show more options after clicking on that select task type update user.

Roua
Regular Contributor
Regular Contributor

@NM , sorry i thought the screenshot was attached: 

Roua_0-1724403503913.png

yes i do have it like this and still it doesn't update and user tasks that's the problem!

NM
Honored Contributor II
Honored Contributor II

@Roua can you share you user update json?

Roua
Regular Contributor
Regular Contributor

update user json in HCM connection: 

{
"customproperty6": "${if(user.customproperty5 == 'P' && user.statuskey == 1){currentDate} else if(user.customproperty5 == 'I'){user.customproperty6} else {''}}"
}


but not only regarding this conditions any user rule that will create update user task, the task won't be resolved 

NM
Honored Contributor II
Honored Contributor II

@Roua not the right json.

try this

{
"actions": {
"Update Login": {
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "",
"httpMethod": "POST",
"httpParams": "{\"lastname\":\"${user.lastname}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": [
200
]
}
]
}

}
}

Roua
Regular Contributor
Regular Contributor

@NM thank you so much for your help, but i tried it it didn't work 
here are the logs i found:
"i tried to search using th jobID i didn't find anything"

NM
Honored Contributor II
Honored Contributor II

@Roua do you see any error in prov comments ?

And is it working from postman?

Do you see number of tries increasing?

Roua
Regular Contributor
Regular Contributor

no errors in prov comments or in the task
i don't have access to postman right now i need some time Sorry



Roua_0-1724407056558.png

Roua_1-1724407371543.png

 

NM
Honored Contributor II
Honored Contributor II

@Roua just try to update a customproperty with a dummy value to check if connection is working .

Do check the URL and connection name matching with connection json name.

Roua
Regular Contributor
Regular Contributor

 

 

Roua
Regular Contributor
Regular Contributor

@NM,
thank you.

i tried as you said i created a test user update rule :
If Users.Custom Property 44 is updated
Then
(Create Update User Task [Connection: SAP HCM , Object: Update Login ])

and then i updated the cp44 and the task was created, so i run the job and still it didn't work


 
Updating Media

and yes i made sure of the connection name and the url 

Roua
Regular Contributor
Regular Contributor

@NM i got the following provisioning comment :
Provisioning Comments

{"call1":{"message":"Exception evaluating property 'statusCode' for java.util.ArrayList, Reason: groovy.lang.MissingPropertyException: No such property: statusCode for class: java.lang.Integer","status":"Failed"}}

  • Please share full information of issue to assist better
    • Configuration ( Share JSON)
    • JOB configuration screenshot
    • Task ID 
    • Logs (showing actual error)

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Roua
Regular Contributor
Regular Contributor

Thank you all for you answer and recommendations, as it was mentioned, i completed it using sav4asv connection like the following: 
ImportUserJSON:

{ 

  "connection": "acctAuth", 

  "successResponses": { 

    "statusCode": [ 

      200, 

      201, 

      202, 

      203, 

      204, 

      205 

    ] 

  }, 

  "url": "xxxxxxxxxxxxxxxxxxxxxx",


  "httpMethod": "GET", 

  "httpHeaders": { 

    "Authorization": "${access_token}", 

    "Accept": "application/json" 

  }, 

  "httpContentType": "application/json", 

  "userResponsePath": "results", 

  "colsToPropsMap":{ 
"username": "username~#~char", 
"customproperty6": "customproperty6~#~char"
} ,


}

MODIFYUSERDATAJSON:

{
  "ADDITIONALTABLES": {
    "USERS": "SELECT customproperty5, customproperty6, customproperty48, USERNAME FROM USERS"
  },
  "COMPUTEDCOLUMNS": [
    "customproperty6"
   
  ],
  "PREPROCESSQUERIES": [
    "UPDATE NEWUSERDATA SET customproperty6 = (SELECT customproperty48 FROM CURRENTUSERS WHERE NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME AND CURRENTUSERS.customproperty5 = 'P') WHERE EXISTS (SELECT 1 FROM CURRENTUSERS WHERE NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME AND CURRENTUSERS.customproperty5 = 'P')",
    "UPDATE NEWUSERDATA SET customproperty6 = NULL WHERE EXISTS (SELECT 1 FROM CURRENTUSERS WHERE NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME AND CURRENTUSERS.customproperty5 <> 'P')"
  ]
}