Hi Vipul,
I tried the sub-workflow and it worked. I was able to pass the variables from one to another.
Here is the what I did:
Created an workflow to get input as a Long URL parameter from the calling workflow.
Call an API to shorten the URL and then return the short URL back to the calling workflow.
The API workflow is as follows:

Then I created the source workflow in which I used the sub-workflow:
It sets the value of strText in Start and then calls a Subworkflow which does the job and returns the short URL which I am printing in the JS.

Note: I had to use instance.var.strText in my Start of the calling workflow to pass the values to the sub-workflow.
However I was able to use vars.shortURL in the Javascript after the values were returned from the sub-workflow.