API for Export for/Update from external review #2

Hi,

After the first attempt to export/update external review via API, I have started to use SDL Studio 2014.

It has the proper automated tasks for these, and the export is working properly. However, I can't get to work the update method: it throws the following error:

Unexpected exception when configuring file multiFileConverter for task 'Update from External Review': Expecting element 'ArrayOfExternalReviewMappingItem' from namespace 'http://schemas.datacontract.org/2004/07/Sdl.ProjectApi.Settings'.. Encountered 'Element'  with name 'ArrayOfExternalReviewMappingItem', namespace 'http://schemas.datacontract.org/2004/07/Sdl.ProjectAutomation.Settings'. .

While, I think I properly fill the ExternalReviewMappingItems of the ImportFromReviewTaskSettings settings group before calling the RunAutomaticTask like this way (C#, and UpdateXliffAndreviewedFilepaths is a string Dictionary):


                ISettingsBundle settings = project.GetSettings(trgLanguage);
                
                ImportFromReviewTaskSettings impSettings = settings.GetSettingsGroup<ImportFromReviewTaskSettings>();

                foreach (string xliff in UpdateXliffAndreviewedFilepaths.Keys)
                {
                    impSettings.ExternalReviewMappingItems.Value.Add(new ExternalReviewMappingItem(xliff, project.GetProjectInfo().Id, UpdateXliffAndreviewedFilepaths[xliff]));
                }
                impSettings.Backup.Value = false;
                impSettings.ConfirmationLevel.Value = ConfirmationLevel.Translated;
                project.UpdateSettings(trgLanguage, settings);

                AutomaticTask task = project.RunAutomaticTask(targetFileIDs,
                        AutomaticTaskTemplateIds.UpdateFromExternalReview);
                checkAutomaticTask(task);

The online API documentation of the new external review automatic tasks are very short without any examples. Could you please advice to solve this issue?


Best regards,

 Barnabás

Parents Reply Children