change document workflow state from an other workflow

Hello team,

I need to change the workflow state of a document from another workflow once this document has been attached.

For example, I create an invoice and then create another proof of payment document.
once the proof of payment has been attached to its invoice, it needs to change state: from not used to already used.

so how do i trigger the proof of payment workflow to change state from the invoice workflow.

Your assistance please