The above mentiond approach worked for listening to the output when a process is running. Apart from that I had to suspend the process and later call stop on the process. Now I couldn't get the output from a stop. I resolved it by creating a static class that holds a hash map of process id as key and output as object value. When a process is stopped, the service work item handler abort method writes the output to the static class hash map and later its available to the thread invoking the stop.
I wished start and stop process both gave the output back(JBPM Dev Team - If you are listening to this, please let me know why this feature is not implemented?)
thanks
lakshmi.