Translation Manager Retrieval for Preview AppData Context

Context

Few months ago I worked in a project, in a customization of the default translation process of Translation Manager.

Back then, everything was working good for them, but one day they came with this idea “We want to be able to review the content in Tridion before the Translation Job is completed”. so that mean that they wanted to have in Tridion the translated content from the Translation Management System (TMS) before the TM Workflow is completed (the Translation Job is marked as Completed).

Because of the requirements of the client, the previous implementation was quite complex, having different event system already running in their box.

Solution

In order to support this scenario, Tridion has a Translation Manager hotfix that needs to be installed. the hotfix is “Hotfix TT88617“. after you install in the box where TM is running, you need to execute some steps in the TMS side. Basically a new manual activity called “Translated Content Retrieval for Preview” needs to be created in the Translation workflow. so, a very basic workflow would be :

TM-workflow

 

Custom Implementation

Because of the previous complex implementation and having in mind that we wanted to let the user to review the translated content in Tridion. and because this content was already in translation process, we were not able to see the translated content in CME graphic interface. So the solution was to publish the translated content (the current minor version) into the staging (Presentation Server), that way they user could hit the page and see its translated content.

Well, that was the solution in paper, after that we needed to design it and then implement it, here is a very high level design of the solution.

solution-design

The green boxes were executed in Event system context, the blue ones, in Automatic workflow activities in Tridion.

so, in a nutshell, we created a event system component that was listening for the save event for the components. In that event we validated that the execution was in a translated context, if so, we validated that it was the “Retrieval for Preview” step and not the final step (completed). if the execution met this validations we would publish the content.

we are not going to go in details about the whole implementation, instead we will focus in once specific part of this, the validation to know if the execution was either in the “Retrieval for Preview” or the translation Job was completed. because both scenarios had the exactly the same context.

In order to validate this, we needed to use Core Services to retrieve the application Data, this is an example :

app-data

once we were able to get the appData we needed to go through it and locate the value of the RetrieveReasons attribugte and validate if the values was “Review”

validation

 

Hope if was helpful.

 

Remote Debugging in Visual Studio Made Easy(ish)

"Object reference not set to an instance of an object?!!"

“Object reference not set to an instance of an object?!!”

I love Tridion. There’s a strange elegance to the way she operates, and when I resolve an issue or learn something new there’s no sweeter feeling. But oftentimes sometimes our Tridion can be a cruel mistress – or mister, as you fancy. We configure, install, develop, and implement on her all day long, and just when it seems we understand each other she delivers a sharp slap to remind us that she’s in charge. Saucy. Continue reading

Translating Page URLs without Localizing Pages

A piece of advise that I learned from a wise Tridion sensei is that it’s not a good practice to localize pages in Tridion if you have a multi-lingual site (though there is an exception to this rule which I’ll discuss below).  The reason for this is simple: you lose the ability to centrally manage your site from the Master web publication.  Once a page is localized, you have to manage it individually, which is not ideal if you want to centrally update component presentations on a page across all the language sites.  So what do you do if you want to obey the rule of not localizing pages and your customer asks to have localized/translated URLs? 

Continue reading

“Inheriting” Metadata on Organizational Items

Recently I had a customer ask me for a rather simple feature – the ability to have Tridion folders and structure groups inherit the metadata schema and values from their parent. This would be only when creating new organizational items and obviously we want to show these default values on screen when editing.

Having spent the past few months completely buried in Anguilla/CME extensions, I obviously started thinking of implementing this by extending a whole bunch of Anguilla Commands and going all crazy on Javascript.

Continue reading