Hi Gurus,
we are using program exit to send mail to outlook on user decsion step and it is working fine for Sequential approval but when we have to send mail for parallel approval(have used block for parallel approval) we are not able to fetch current agent.
- Have store agent in workflow container 'Agent' and used it in Block in workflow for implementing parallel appoaval.
- Created class implementing inetrface IF_SWF_IFS_WORKITEM_EXIT and put it under program exit of user decsion in workflow
- Now in this class I have created method at work item created to trigger email for which i require runtime work item id and agent for it.
- We are getting workitem id at runtime and based on it picking up approval agent from workflow container and send mail to it.
- this workfs fine for sequential one as there is only one approver at a time but in parallel where all approver are maintained in one multiline container, it is sending mail to first person maintained in multiline container.
Please find steps below what i have tried:-
- i tried with FM RH_USERS_OF_WI_READ to get current agent for particular work item id but it is throwing dump no value found at runtime but stangely gives value if we run standalone for same work item id.
- Then, I tried putting wait upto to see if it helps, but then also above fm is unable to fetch agent.
- Tried by putting select on SWWUSERWI table but that also is not giving current agent
Question is:
Why we are not able to get value of current agent through above FM or select from userwi table? How do we get current agent value at the time of work item creation event is triggered which further hits our custom method.
Please help...
Regards
Ajit C