cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions for High Level System Monitoring

richhanbidge
Champ in-the-making
Champ in-the-making
Hi, I'm looking for a generic way to be notified when an exception happens in the system.  We had a periodic system task fail last week, and we didn't find out until one of our users told us about it.  I'd like to be notified before they notice.  Smiley Happy

I've seen there are ways to use BPMNErrors, but I'm looking for something higher level.  I'd prefer not to author a similar construct for each periodic task.

If possible, I'd like to have a new process started in response to an exception, such that a human gets notified.  I could imagine a SystemErrorsProcess which assigns itself to an Admin group, and sends an email notification to everyone in that group.  I'm just not sure how to get started with such a solution, or if it's even a reasonable approach from a BPMN/Workflow perspective.

Is there a way to register for a general Error event, such that we can achieve this, or a similar result?  If there is a best practice contrary to what I'm thinking, I'd love to hear that as well.

Cheers,
Rich
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Do you mean that one of the service tasks was failing? If this service task is a job you could use the event handlers of the Activiti Engine (http://activiti.org/userguide/index.html#eventDispatcher) to listen to JOB_EXECUTION_FAILURE events. It's also possible to throw a BpmnError from a service task and listen to the UNCAUGHT_BPMN_ERROR event without needing to add catching error event elements in the process definition. Is this what you are looking for?

Best regards,

richhanbidge
Champ in-the-making
Champ in-the-making
Thanks Tijs; that's _exactly_ what I was looking for.  I appreciate the pointer.

Have a great holiday,
Rich

sdeschenes
Champ in-the-making
Champ in-the-making
Can you tell me when UNCAUGHT_BPMN_ERROR  is really thrown and how to catch it?

I've created a ActivtiEventListener that I have registered in the ProcessEngine. It receive a lot of events, but I wasn't able to get the UNCAUGHT_BPMN_ERROR event. It instead log a "BpmnError: No catching boundary event found for error with errorCode" message and freeze there. My test never finish.

I may have do something wrong, just searching for an example somewhere and I've done a globak search for :  UNCAUGHT_BPMN_ERROR and found nothing…

richhanbidge
Champ in-the-making
Champ in-the-making
If it's really important you cause that execution flow, I'd suggest looking through the code on github; that's what I did.  I was happy with the testing I was able to achieve with unit tests, and that I covered all "bad" sounding events was good enough for our scenario.

Sorry I can't be of more assistance!
Rich