The "Delegators" table holds the information regarding Share my work. The delegator column has the list of all the delegators and the delegate.
column holds the list of users that were delegated the work.
All usernames used in explanation below are test username only.
When any users delegates his work, all his tasks will get duplicate entries created in the UserActions table with Owner as the new delegatee.
If the original owner approves/rejects the task the original entry gets updated and the duplicate gets marked as Archive.
Below are screen shots of Original and duplicate before approval in the useractions table.
The first one is the duplicate entry created after delegation and second one is the original entry.
Both the entries will have the same contextID and TaskID but the useractionID will be different.
The useractiondelegatorID and delegator column refer to the user who has shared the work.
The Owner column is the current owner for the task. For the first row this field refers to user who was delegated the work, the owner of the second row is the actual owner who has delegated task.
Useractionstate=1 means both the item are pending action.
Now, let me approve the task. Login as the delegate (i.e 57644540) and approve the task. Results after approving the task.
After approval first row useractionstate gets updated to 3 (which means completed (can be approved/rejected) and the other duplicate entry gets archived (useractionstate=4).
The result column of the same table can give info on whether it was approved/rejected.