I am trying to trigger a translation job from an external workflow activity on a Web 8.5 instance. When I save the TranslationJobData I get the following error:
ERROR Project.Workflow.SendTranslationActivityWorker - System.ServiceModel.FaultException`1[Tridion.TranslationManager.V2.Data.TmServiceFault]: Nullable object must have a value. (Fault Detail is equal to Tridion.TranslationManager.V2.Data.TmServiceFault)
I am pushing the job using the following code:
public static string Translate(string userId, string title, string publicationId, IEnumerable<string> items, bool includeItemsAlreadyTranslated)
{
using (SessionAwareTmServiceClient tmClient = new SessionAwareTmServiceClient("TmBinaryEndpointV2"))
{
TranslationJobData job = tmClient.CreateJob(title, publicationId, Tridion.TranslationManager.V2.Data.TranslationJobType.PushJob);
job.RequiredDate = DateTime.Now;
job.Priority = Tridion.TranslationManager.V2.Data.TranslationJobPriority.High;
foreach (string item in items)
{
job.AddedItems.Add(new AddedItemData() { TcmUri = item });
}
job.IncludeItemsAlreadyTranslated = includeItemsAlreadyTranslated;
job.State = Tridion.TranslationManager.V2.Data.TranslationJobState.ReadyForTranslation;
tmClient.SaveJob(job);
return job.Id.ToString();
}
}
Project.Workflow.SendTranslationActivityWorker
calls Translate
directly, and thus throws the error.
I've confirmed that the error does occur on the tmClient.SaveJob(job);
I've also confirmed that none of the values I am adding to the job are null and that none of the values I am using to create the job are null.
I've confirmed that I am using the correct endpoint on my tmClient.
I can manually translate items with the same configuration as the items I am trying to translate through workflow, in the same publication.