How to get a history of process execution when an error occurred in service task?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

How to get a history of process execution when an error occurred in service task?

Jump to solution

Hi all

I have a problem with getting history of process execution.
My process: startEvent -> task1 -> task2 ->endEvent, where task1 and task2 are service tasks
There is a table ACT_HI_ACTINST, but into it rows are added only when process finished successfully.

When i got an error in task2, do i have a chance to get from some history table info, that process was started, finished task1 and got error on task2?

Thanks in advance

1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator

Re: How to get a history of process execution when an error occurred in service task?

Jump to solution

You should add an error handling in your process definition related to the event error that you want to catch.

So I suggest to add a new flow in your process similar to the following one:

https://www.activiti.org/userguide/#bpmnErrorEventDefinition

Then you can use the HistoryService to retrieve all your needed informations during the execution of your workflow instance. 

View solution in original post

2 Replies
Highlighted
Moderator
Moderator

Re: How to get a history of process execution when an error occurred in service task?

Jump to solution

You should add an error handling in your process definition related to the event error that you want to catch.

So I suggest to add a new flow in your process similar to the following one:

https://www.activiti.org/userguide/#bpmnErrorEventDefinition

Then you can use the HistoryService to retrieve all your needed informations during the execution of your workflow instance. 

View solution in original post

Highlighted
Member II

Re: How to get a history of process execution when an error occurred in service task?

Jump to solution

Hi, Piergiorgio Lucidi‌ thanks for replay

I didn't want to over complicate my process definition, but didn't find any other option Smiley Happy