Trying automate translation jobs within workflow from Sites 9.1 to rename process instances to add the translation job name.
ProcessInstance processInstance = new ProcessInstance(subject.Process.Id, subject.Session);
processInstance.Title = string.Format("[{0}] [{1}] [{2}]", language, pageName, title);
processInstance.Save();
Followed steps in solution for Unable to find Translation Manager TmBinaryEndpoint for 8.5
Added App.config and copied <system.serviceModel> section from TcmWorkFlowAgent.exe.config
In OnActivityInstanceStartPre Event Handler I get the tcmid of the item in workflow
string itemid = "tcm:0-0-0";
foreach (WorkItem workItem in subject.WorkItems)
{
itemid = workItem.Subject.Id;
break;
}
Then try to get a tmClient
using (var tmClient = new SessionAwareTmServiceClient("TmBinaryEndpointV2"))
{
TcmItemTranslationInfoData ti = tmClient.GetTcmItemTranslationInfo(itemid);
jobTitle = ti.ItemTitle;
}
The code fails with exception
Could not find endpoint element with name 'TmBinaryEndpointV2' and contract 'Tridion.TranslationManager.V2.TmService.Client.ISessionAwareTmService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
Are there any extra steps required to use the TmClient on Sites 9.1?