2. Poll the database until the processing is complete for this UniqueCompletionID, then redirect to the Dynamiv view page, passing on the UniqueCompletionId.
I am not 100% but,
You might want to look at the option in the Module Configuration | Validation Configuration
1. You enable custom Validation script
2. Enter a store procedure that handles your processing of the record, if it returns a ISVALID parameter, your Completion Event will continue.
Maybe someone in the DS staff can concur in my line of thinking or I could be wrong in my understanding of your question.