Howto write an error message from a custom Actor Filter?

Hi experts,

I’m using Bonita 7.2.3 Community and I’ve implemented a custom actor filter that works fine.

I’d like it to write an error message just in case of an Exception, and I need it to be visible in the Administrator Portal.

How can I do it?

Regards,
Jose.

Hi Jose,

I’m not aware about any way to display an error in the Administrator Portal.

What you can do is use a logger in the actor filter implementation to log an message in case of error.

Here is an example:

Logger logger = Logger.getLogger(“org.bonitasoft”);
logger.severe(“error”);

Cheers

I’ve just find out how to do that:

try {
getAPIAccessor().getProcessAPI().addProcessComment(getExecutionContext().getProcessInstanceId(), “my message goes here”);
} catch (CreationException ignored) {
log.severe(“unable to add a comment”);
}

The message will appear comments section (bottom of the page)

Hi josegante,

I’m facing the same need to write a message for it to be displayed in admin portal. Did you find the way to do that.

Any help would be appreciated.
Best regards,

Sayed.