Search code examples
loggingworkflowhippocmsactivity-streams

Customizing HippoCms ActivityStream message for custom workflow plugin


I've created a custom plugin for Hippo CMS (Hippo v7.9.3, CMS v2.26.07), which adds a button to image gallery elements' toolbar. The button opens a popup, which (after a file upload), replaces some images on the site.

The plugin was developed heavily based on this tutorial: http://www.onehippo.org/labs/adding-a-workflow-to-hippo-cms-editor-toolbar.html But in my case I do not store extra data, I just use the node existing content.

The image replacement is working properly, and the workflow interaction is as expected. But after each successful execution, Hippo logs the following line on the Activity Stream:

This morning, [Warning: Property for 'replaceImages,class=com.wgo.workflow.ImageReplacementWorkflowImpl' not found]

Properties defined for i18n of the frontend plugin are correctly being loaded, as my custom messages appear on the frontend popup when clicking the button. And my plugin uses no custom property, as the only input it takes is the file loaded from the popup (which is working).

As a JCR node in the Repository is being loaded (with the hippolog:interaction with the value image-replacement-workflow:image-replacement-workflow:replaceImages), I've come to assume Hippo takes that node and attempts to find a human readable name... somewhere, and that lookup is what is currently failing.

So, where and how do I define that message to avoid it looking as a failure instead of a success? Or how do I completely remove that message for my plugin, if customization is not possible?

I managed to track this event up to org.hippoecm.repository.impl.WorkflowLogger, and lost track there.


Solution

  • That's a wicket message. You have a method or action replaceImages and it is looking for the message to display. I think you can just add a properties file ImageReplacementWorkflowImpl.properties at path com.wgo.workflow. The property replaceImages should be set to the message you want to display.