Pass result from subprocess to main process camunda modeler

I need to pass result from subprocess to main process.How could i model it camunda modeler.
I have seen DelegatedVarMapping but not getting how to implement ?

Thank you.

If you’re using a call activity to call the sub process then there is a variables tab in the Camunda modeler’s properties panel that you can use to map the output to the parent.

Thanks for your immediate response.
I am using java delegate to execute the sub process.
Can we use result from subprocess in main process in this scenario?

Maybe you could use message events to send something back to the main process.

Does not a subprocess already share context with the parent process?

(I don’t mean reusing a process via call activity, but maybe you are? I don’t use Camunda as my main BPM product.)

It does indeed - there would be no need to send any variables back or do anyting.
In this case i’m assuming that a Call Activity is being used.