Howto write an error message from a custom Actor Filter?

1
0
-1

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.

Comments

Submitted by srunjanally on Thu, 07/21/2016 - 18:22

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.

2 answers

1
+2
-1
This one is the BEST answer!

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)

1
0
-1

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:

  1. Logger logger = Logger.getLogger("org.bonitasoft");
  2. logger.severe("error");

Cheers

Notifications