Delete documents from My Library after submit

Is there anyway to remove a document from My Library after it has been submitted or to lock the document so it is not alterable? Or rather enforce or programmatically remove?

You’ll want to return a Custom HTTP Server Response Code from your HTTP Server Input plugin in workflow.

If you return code 291, the document that was submitted will be removed from your library.

Great, this works well. I also got this information from another source, except was told “291 OK”