Undeployment is a twofold operation: undeploy the web module and remove the process definition from the database.
Undeploying the web module effectively makes the related process definition unreachable, but the process data stays in the database and can be queried later. This is normally what you want, unless you want to purge the data as well.
You can use the methods in GraphSession to delete an individual process instance or an entire process definition from the database. There is an open issue with constraint violations on Oracle (BPEL-252) but it needs to be investigated further.
By the way, any input you can provide on the aforementioned issue (your database, driver, and any exception you encounter while deleting the process definition) will be appreciated.