The user of my system was creating a JBPM process which was query a remote database repeatedly. The response of the query was some time so large so that it was crashing JBPM. I implemented a throttling mechanism by modifying and adding new classes in JBPM and JBossWS. In SOAPClient of JBPM I added two new attributes in HTTP header RESPONSE_LIMIT and OVER_LIMIT_RESPONSE_ACTION. I then modified SOAPMessageUnMarshaller class of JBossWS and managed HTTP Input Stream as per the action defined in the higher layer.
I have attached the source code in case some one else is facing the same issue.