cancel
Showing results for 
Search instead for 
Did you mean: 

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

alekseipot
Champ in-the-making
Champ in-the-making

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 ACCEPTED ANSWER

openpj
Elite Collaborator
Elite Collaborator

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 answer in original post

2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator

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. 

alekseipot
Champ in-the-making
Champ in-the-making

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