HR task state change

anusarma
Kilo Expert

Hi All,

We have a workflow in HR lifecycle events application scope, in which we are generating multiple HR tasks at a time under a HR case. One of the task, say task A, is set to be in a "pending" state when generated. This is configured in the workflow in the "create task" activity. This task is dependent on another task, say task B. When task B changes state to "closed complete", then task A should change state to "ready". We are trying to achieve this from the workflow using a "run script" activity after task B is closed. However, it is not working as required when we tested as impersonating the task assignee and closing task B. Task A continues to be in the "pending" state even after task B is closed when done like this. However, if we as system administrator closes the task B directly from the "state" field dropdown, then task A is getting updated to ready state. We are not sure why it is not happening if we impersonate as task assignee and closes task B.

We also tried to achieve this using business rule in HR lifecycle events application, it is behaving the same way as when done via workflow.

We also tried the same business rule in HR core application scope. However, it didn't work then as well.

Could someone please suggest what could be the possible issue and solution?

Thanks in advance,

Anu

1 ACCEPTED SOLUTION

We were finally able to fix this issue, by adding a timer activity for 3s before the run script activity. It was found that when user tries to close the task and at the same time, system tries to update the state of another task, it would take the lowest access level and tries to update the task based on that, due to which it was not working for those users, but only for admins. When a timer activity was included, then system will update the state of the other task without any issues.

View solution in original post

9 REPLIES 9

This looks ot be an ACL issue maybe the users don't have access to change the state but the admins can,hence BR is running for admins only.Kindly check the ACL on the field/table to edit.

OR,

replace if(gr_tsk.next()) with while(gr_nxt()) maybe that helps.

Regards,

Munender

Hi,

I have checked  ACLs, and have added the required group's roles to these ACLs. From the instance view, they are now directly able to edit the state field from the HR task form. However, the auto-updation is not still happening when impersonating as these users and testing.

if/while is not causing this issue..

Regards,

Anu

We were finally able to fix this issue, by adding a timer activity for 3s before the run script activity. It was found that when user tries to close the task and at the same time, system tries to update the state of another task, it would take the lowest access level and tries to update the task based on that, due to which it was not working for those users, but only for admins. When a timer activity was included, then system will update the state of the other task without any issues.

Thanks a lot for all your time and help. We were finally able to fix the issue. Have posted it in the thread.

Glad to hear that Anu!

 

Regards,

Munender