This post will talk about an alternate to ensure the self-auto approved action shows initiator name instead of the person name on whom the transaction is initiated i.e. incumbent.
The seeded functionality allows the person name on whom the transaction is initiated gets displayed in the approval history, in ample of real time scenarios it may not look logical, e.g. Manager initiating the leave transaction for sub-ordinate shows the sub-ordinate name as self-auto approver. The expected functionality in the scenario would be the manager name to come as auto-approver instead of the sub-ordinate.
By default below is the setup for the self-auto approved section -
HierarchyBuilder.getManager("supervisory",Task.payload.absencesApprovalsRequest.Requestor,-1,null,"LINE_MANAGER")
This has to be replaced with below content, it has to be chipped in through the BPM for that particular transaction in the sections 'starting participant' and 'top participant' -
HierarchyBuilder.getPrincipal(Task.creator,-1,"","")
Try this out and feel free to connect in case you are stuck.
Comments