Cancel publication event and show error

Hi,

we have the requirement that a translated document should not be publishable if the main document is not yet published.
If an editor tries to publish e.g. an English document while the “main” German one with the same hippotranslation:id is not live, the publication should be cancelled and the editor is shown an error.

We already use the detection of a publication event in our project on various places as described in the docs. However, I do not know of a way to cancel the event subsequently (may be even too late here?) and show an error message to the user.

I also thought of a custom validator but only know how to use them to prevent saving - which should be possible here.

Do you have any ideas?

Best regards,
Max

Hey Max,

Indeed, it’s too late at the point of publication event. You’d have to hook into the SCXML workflow engine https://documentation.bloomreach.com/14/library/concepts/workflow/scxml-workflow-engine.html and somehow make a document not “publishable” if your condition is not met.