Here I am providing various flavors of Purging BPEL instances.
Following options will be covered:
1) Purges instance for a particular domain, for particular state
and for particular specified period from the BPEL dehydration store.
2) purges instance for a particular domain,version and between specified period for any state other than state 0 and 1 from the BPEL dehydration store.
3) Purges all the instance in one go from the dehydration store. (Handle with care)
All you need to do is, run the code under ORABPEL Schema. So scroll down and enjoy the show.