Obtaining Alert Status During SDL Tridion 2011 Publishing

We would like to implement some functions so that sometime an error occurs when publishing or resolving, and we skip it using the try / catch block, but still want to notify the user that something has been skipped.

The SDL Tridion 2011 publishing queue can be filtered by status. One of these statuses is Warning. Is it possible to initiate a publication transaction in order to have the warning status using the API in the template code or user permission?

+3
source share
2 answers

I'm afraid this is not possible, but the answers above may help you find an alternative solution.

+1
source

If all you need is a warning at the time of publication (so that the message “Publish transaction had a status warning”), you need to set PublishInstruction.MaximumNumberOfRenderFailures to something greater than 0. If the number of Render errors is less than the maximum you specify, the publication status will be "A warning".

If an error occurs outside of the rendering, the instruction will be displayed as "Failure".

On the other hand, if you want to display a message in the GUI (in MessageCenter) with a “Warning” that something went wrong, you will need a more complex architecture. Frank worked on this a while ago. The idea (IIRC) is to have a part of the GUI, for example. iframe polling a service that returns statuses for this user. Post action. An event system would create these statuses, controlling PublishInstruction, and write them to the repository (file, db, memory) that the service could poll.

+4
source

All Articles