Translation connector - implementation for scope requests
We are currently developing a translation connector based on the example implementation (https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector) and using the translation API documentation (https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc/com/adobe/granite/translation/api/package-summary.html) as a help.
We are using AEM 6.2 and struggling with implementing the optional scoping request path as shown in this diagram:
https://files.acrobat.com/a/preview/32824bd9-6cc6-41b4-bc7b-8e7c4d2c7d65
Our problem is that the “createTranslationJob” method on the TranslationService Interface (com.adobe.granite.translation.api) is called twice for the same translation job project. The first time when the user clicks on “Request scope”. The second time when he clicks on “Start” after scoping is complete. Moreover, the translation objects are only uploaded to the first job and not the second one.
We would have expected that AEM calls “createTranslationJob” only once for a translation project and updates the status of the translation job from SCOPE_COMPLETE to COMMITED_FOR_TRANSLATION by calling “updateTranslationJobState”.
Why is “createTranslationJob” called twice?
Is there any way to figure out that createTranslationJob is called the second time for the same translation project? And what the returned job id of the first call is?
Thanks for the help.



