9

We're currently building a storage extension. If something goes wrong, we can throw an exception and this will result in the publishing to fail, showing an error in the publish queue.

However, we would also like to support a case where the storage extension sends a "warning" state to the publishing queue.

I tried to find a way to do this, but couldn't find anything.

I'm wondering if this is possible/supported, or if we should find another way to do this.

5

You might be able to achieve that using a CM Event handler for PublishTransaction Save (Initiated phase).

If the Publish Transaction state is set to Failed and you recognize your error/warning message in the deployment feedback XML (stored in PublishTransaction.Information), you could change the state to Warning.

  • Thanks for sharing this, Rick. Do you per chance know how to set deployment feedback XML on the Deployer side as well? We want to set the warning, but let the publishing push through without actually failing by throwing an exception on the Deployer. – Nickoli Roussakov Nov 28 '16 at 21:31
  • I'm hoping that if your deployer extension throws an exception, the exception message ends up in the Deployment feedback XML (not so sure about that, though). – Rick Pannekoek Nov 29 '16 at 14:28
  • If you don't want to throw an exception, then I think you are out of luck. – Rick Pannekoek Nov 29 '16 at 14:29
  • we can throw an exception if we have to, but the goal is to still push publishing through with a warning. The storage extension is could crap out, but it's not mission critical for publishing, hence we want to let the user know it had an issue, but their content was still published to the main source, i.e. the Broker. – Nickoli Roussakov Nov 29 '16 at 14:33
1

You could also possibly use the Java SignalR client (https://github.com/SignalR/java-client) and send a message to a backend SignalR hub (to be created and hosted in IIS).

Then, you could notify the user with a notification in the GUI (SignalR JS client), and/or update the status of the item in the Publish Queue (.Net SignalR client), or other operations when something funky happens in the storage extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.