Level 2
October 14, 2025
Question
Issue with Machine Translation in AEM Cloud Workflow
- October 14, 2025
- 1 reply
- 489 views
In AEM as a Cloud Service, I have configured a translation integration using a Microsoft subscription key. Manual translation of page content working as expected.
To automate the translation process, I created a launcher that triggers a custom workflow whenever a user updates page content.
Within this workflow, a process step initiates the translation workflow.
However, the translation method is consistently set to Human Translation, whereas I intend to use Machine Translation.
I would appreciate any guidance on how to ensure that the translation workflow uses Machine Translation instead.
Thank you in advance for your support.
In my custom workflow process step, I am using the below code
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap processArguments) throws WorkflowException {
String payloadPath = workItem.getWorkflowData().getPayload().toString();
WorkflowModel createStructureWorkflowModel = workflowSession.getModel("/etc/workflow/models/wcm-translation/create_language_copy/jcr:content/model");
Map<String, Object> workflowMetaData = new HashMap<>();
workflowMetaData.put("projectType", "add_new");
workflowMetaData.put("srcPathList", payloadPath);
workflowMetaData.put("translationProviderCredential", StringUtils.EMPTY);
workflowMetaData.put("cloudConfigPath", "/conf/global/settings/cloudconfigs/translation/msft-translation/ms-arabic-translator");
workflowMetaData.put("shallowList", "false");
workflowMetaData.put("languageList", "ar");
workflowMetaData.put("translationWorkflowModel", "/etc/workflow/models/wcm-translation/prepare_translation_project/jcr:content/model");
workflowMetaData.put("projectFolderLanguageRefCount", "1");
workflowMetaData.put("createNonEmptyAncestors", "true");
workflowMetaData.put("deep", "true");
workflowMetaData.put("cq:conf", "/conf/global");
WorkflowData workflowData = workflowSession.newWorkflowData("JCR_PATH", payloadPath);
workflowSession.startWorkflow(createStructureWorkflowModel, workflowData, workflowMetaData);
}