Marc Kelderman wrote a helpful article on this topic:
One of the users there notes:
Note there is a patch to 10.1.3.3 to purge old data (6372741). Its a fairly dumb one that deletes everything older than a given date. Trying to do something more elaborate we have noticed that if you use the script in this article as a basis then rows in xml_document table are not removed.
We have written code to conditionally purge BPEL instances in a sophisticated manner, taking into account custom logic, scheduling, and performance for multiple customers in SOA/BPEL versions 10.1.2 and 10.1.3.x. The fact is that purging should be strategically planned to meet your unique use of Oracle BPEL.
Drop us a note if you would like to discuss your specific needs. We are very responsive and happy to jump onto an initial call for FREE.