cancel
Showing results for 
Search instead for 
Did you mean: 

[History API] Persist stackstaces for failed task executions

akozik
Champ in-the-making
Champ in-the-making
Recently I've been working on a process history view that uses History API heavily.
I came to a problem getting information about failed task executions from history.
Is there any way of populating history table with failed task executions along with information about the cause of a failure?
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
What do you mean by "failed task executions"? Do you mean jobs?

Currently, the last exception message and stacktrace is stored in the ACT_RU_JOB table, until the moment the job is executed again. When successful the second time, job disappears, if not, new exception is stored. We currently don't have plans to add this in the history. Currently, the history contains process-stuff that happened in the past. Failed jobs didn't actually "happen" when you look at it from a process-perspective, since process-state is unaltered and transaction is rolled back on failure.

You can always build a custom solution, by wrapping the existing JobHandlers and logging any exceptions occurred in your own solution.

mstolarski
Champ in-the-making
Champ in-the-making
Hi,

I think failed jobs have significant meaning when looking from a process-perspective. Process state is altered - consider retry counters and "FailedJobListener mechanism", which can change the
way process is executed.

Cheers,
Mike

frederikherema1
Star Contributor
Star Contributor
I can see the use case where it can be interesting to know this. As I said, you can create your own JobHandler (which wraps the existing ones) and adds this logic there. You can just plug in this custom class in the configuration without having to alter any of the activiti-source code.

Eg:

http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/jav...

http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/jav...
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.