I am developing a Worklight application in which i would like to add a progress bar with % value between request and response of a Worklight Adapter call.
Can anyone please suggest whether there is either a built-in functionality or any other logic which i can use to show the percentage with progress bar?
This is not possible IMO - Worklight does not provide nor can it provide such functionality in a reliable and consistent manner.
You have a request and you have a response. You can't reliably know when will the request be received by the server and then by the backend and back. It depends on various factors (payload size, network speed, ...).
I don't think you could accomplish this w/out overly complicating things.
Maybe what you could do is "cheat" and say that a request = 0% and a response = 100%, and so as long as there is no response (either success or failure) then display a running number or some such. And when a response is received in the application, jump to 100%.
It's not reliable because it could jump to 100% right away, and it could potentially even cross 100% if you are changing numbers very fast but it takes an even longer amount of time to receive the response...
So I think a spinner indicator (= WL.BusyIndicator
or alike) is a better approach. Additionally, you should question your scenario, for example: how to make it faster and more efficient.