I am not an expert in workflow approvals, but from what I see: yes your approval is done by a particular user. That user might not even be logged in the system (approve via email). So I think you need to re-consider your design of your solution, as you can't know what responsibility the user might have potentially selected to approve. Either you include that in the approval message, or you just change the logic in our system. As you want to impersonate some program code to the approval user, you'll maybe define a default responsibility for that purpose? Or you store your settings at another place, maybe user-level profile option rather than respo-based?
I have raised an SR for the issue. Waiting for the response. I have already implemented the changes by adding default responsibility few days before and it is working fine. But I just want to know if there is any other alternative without using default responsibility. Thanks for your response.
If you have designed the solution correctly then you should never have to call fnd_global.initialize.
Since it sounds like they are responding to the notifications outside of the system/without having to login, it's going to be hard to retrieve this information if it's not there, other than making some assumptions in your code to always just submit as this user/resp id combination.
The only thing I can think of is depending on which workflow it is, there may be Responsibility_ID value set in the Workflow Details...Now it's probably not really the one you want, but it's something...Usually whatever was being used at the time to submit the workflow...not necessarily one that the responder has access to.
maybe you can share with us what kind of configuration you need to get from responsibility level? You say you need certain profile values. But is that relevant on responsibility level? Is it possible that the approver has two responsibilities with different profile values? If so, why, what is the difference? I think you need to avoid such scenarios in your application design and set this on user level... or derive these values in another way.
In any case I think we all would appreciate if you share with us details on how you finally solved your case.