on 2018 Sep 11 4:08 AM
Hi Experts,
I used uSleep function in termination case. The system waits for 5 minutes to complete some other activities, before it terminates the user.
The function works fine in most case. But when there were any issue with the dispatcher, the uSleep sleeps forever and will never wake up again. Dispatcher restart will not resolve issue, unless you restart the the task by force.
Is there any way to avoid the uSleep issue?
Thanks,
Chenyang
Couldn't you just use a Wait Task? Both IDM v7.2 and v8 have something along these lines. I would assume the task you're speaking about is tied into the Modify Task for the MX_FS_EMPLOYMENT_STATUS or MX_FS_EMPLOYMENT_STATUS_ID attributes. If the attribute is modified, you evaluate the new value in your task and, if the identity is now terminated, you perform your termination process.
During the termination process, you're probably calling another, external process that has to complete its actions before the remaining operations in your main task complete. Immediately after the task that has the uProvision in the script or is linked to that external task, in IDM v7.2, insert an ordered task group and in the Result Handling tab, select the box at the top, "Wait for Event Tasks". In IDM v8, there's a specific, "Wait Task" you can insert into the workflow chart (the new thing in Eclipse that looks like a Visio diagram). Both of these will accomplish the same thing, await for all tasks associated with this AuditID to complete before moving on to the next item on your main event task workflow.
This is much more reliable than using the uSleep function because it's not time sensitive. What happens on a especially heavy processing day when IDM is churning through a TON of data and that sub process takes longer than 5 minutes to complete? Might happen only once in a blue moon but do you really want your process to have that kind of vulnerability? Using a wait task is much cleaner and will work right every time. Heck, might even be faster because, likely, in most situations, your sub task won't take 5 minutes to finish so now your main process can move forward more quickly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brandon,
I like your idea. I will test your solution with wait task.
cheers
Chenyang
Hi Brandon,
Sorry for slow response. I tested the "wait solution"solution and it didn't work unfortunately.
The "Wait task" does not actually wait for other activities of the same identity to complete before moving on to the next one - terminate the user. The termination happens to the user first, then some other updates continue to the identity which cause inconsistency.
I have a sync job to read and update employee profiles from SuccessFactors to IdM. There are many attributes to calculate and update, so it is quite time consuming. There is another event based task "termination" which is set on the create/update event of mx_fs_employment_status_id.
I want the user update to complete first, before it triggers the termination event. The "wait task" does not wait for the user update job, which is outside of the termination task.
Can you share some other ideas on the issue I am facing?
Thanks,
Chenyang
Maybe your best bet would be to have two separate reads of attribute updates from SuccessFactors. Have your current sync job operate as normal and read in all the employee profile updates but disable the update to MX_FS_EMPLOYMENT_STATUS_ID. Then, once that task has completed and updated all the attributes in IDM, have a second task that does the same read from SuccessFactors but only updates the MX_FS_EMPLOYMENT_STATUS_ID attributes on your user records. Now, when anyone's records gets a terminated status, then your termination process begins. Perhaps that would work?
User | Count |
---|---|
60 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.