CMS - add actions on document unpublish event

Hi,

I need to add a customization (performing a REST call) after a document has been unpublished.
Do you know if there is any class to extend and method to override to add this call, or any configuration to be done?
Thank you!

Flavio

You can use a workflow event listener [1].

[1] https://documentation.bloomreach.com/library/concepts/workflow/workflow-events.html

Thank you Jasper,

just a question. In that page is mentioned the interaction, named default:handle:publish for publication.
How can I see the list of these interactions? I need the one related to unpublication, I guess it is default:handle:unpublish but it is only a guess…

Thanks!

Unfortunately there is no list of these interactions, afaik. you can check in the event log in the console. An entry will be created there. Best to start with an empty event log, they aren’t ordered for humans.

As far as I know, the interaction comprises (1) the repo workflow category name, (2) the repo workflow name and (3) the repo workflow action name.

I’ve once documented some hits in the examples and comments – not fully enough though – for a forge module. [1]
Anyway, those were not documented well yet in our online documentation.

For unpublication, it should be default:handle:depublish.

In the end the (3) workflow action names are the same as the operation names of each of these:

  • org.onehippo.repository.documentworkflow.DocumentWorkflow
  • org.hippoecm.repository.standardworkflow.FolderWorkflow

[1] Apache Camel - Hippo Events Support Documentation – Hippo Event Component

Or, simply set a breakpoint that catches a generic event. Then inspect the variables

Thank you all a lot!!
I confirm that the event is default:handle:depublish and I managed to catch the depublication event