Copy link to clipboard
Copied
Hello,
I'm a web developper and I'm integrating the Adobe sign API into a web application in order to send document from the application to Adobe so they can be treated and sign by the designated persons.
The requirement here is to select the documents and receivers on our application to send them to adobe sign's API in order to create an agreement with authoring status and then to display the authoring view so our user is able to modify what's requested and then send the agreement to signers.
Our web application is coded using Java so I'm using adobe sign java sdk to make api calls https://github.com/adobe-sign/AdobeSignJavaSdk.
The issue here is that once I called createAggreement if I try to retrieve the url of the authoring view (using createAgreementView) right after sending the creation call it's sending me a bad request exception.
What I'm seeing is that at this point the agreement status is DOCUMENTS_NOT_YET_PROCESSED, so I tried waiting a few seconds before calling createAgreementView. After waiting ~4s by documents the agreement is now at authoring status and the view is found with the corresponding url to use.
Making the thread wait for an arbitrary amount of time is not really satisfying for me so I tried to make something cleaner:
I guess I'm missing something and there is a way to do this properly, I hope someone can help me on that. If you need more information I will do my best to povide them.
Thank you for your time.
Have something to add?