how to Wait for process to complete the task?

how to Wait for process to complete the task?

  
We have process defined to carry out a set of automated task, we have tricky requirement here
 
  1.  There are cases we don’t  require wait for the process to complete once we fire the request. Invocation of process is async in nature i.e. fire and forget
  2. There are cases we   require wait for the process to complete and show the result to the user immediately. It is appreciated if anyone guide us here