How to retry a failed task instance in community edition



I am using the community edition of bonita. There's a way in documentation to retry a failed connector instance ( How can I retry a failed human task again.

if a task is failed in the middle of the process flow, that will not be able to continue. The failure reason can be db server issue or something. Please suggest me a way to overcome this issue.

Thank you

1 answer

This one is the BEST answer!


You can use an error boundary event that is thrown if an error occurs during a task or call activity. It stops the normal process flow and diverts the process to an exception flow. Then you can define a sub-process to correct the error and continue the process.

The error event behaviour is described in the documentation.

I hope this helps


Submitted by sithara_1989699 on Mon, 01/11/2021 - 05:00

Thank you very much. Is it possible to redirect exception flow to Step1 task

Submitted by Dibyajit.Roy on Mon, 01/11/2021 - 06:22

This is how i manage failed Human Tasks.

Go to -> Administrator-> BPM-> Cases-> Failed Cases-> Open the Case->Click on the Failed Human Task -> On the browser Url, See the Id that is mentioned. Each failed human Task has a failed Task Id mentioned in the Url once you open the Failed Human Activity.

Now copy the Id and save in Notepad.

Create a process with a script task.

Add the groovy script.

import org.bonitasoft.engine.bpm.connector.ConnectorInstance;
import org.bonitasoft.engine.bpm.connector.ConnectorInstancesSearchDescriptor;
import org.bonitasoft.engine.bpm.connector.ConnectorState;
import org.bonitasoft.engine.bpm.connector.ConnectorStateReset;
import org.bonitasoft.engine.session.APISession;

Now just pass the failed Id from a custom User form to the script.

Once you click on the Submit, this script will run and the Human Task will be re-tried. If the Main cause of Problem is corrected , Human task will be working again and assigned to correct user.


Submitted by sithara_1989699 on Mon, 01/11/2021 - 07:42

Thank you very much @Dibyajit.Roy. I tried your way. That's working for me.

I would like to handle the errors using boundary event also. Do you have any idea about that. I found this example. but the downloading link seems to be corrupted.

Thank you.

Submitted by delphine.coille on Mon, 01/11/2021 - 08:30

Hello sithara_1989699,

You are right this blog article is very well to understand the different ways to handle errors using boundary events. The example has been removed from the project section because it is only available for v 5.x

I will work on a new example and will keep you posted as soon as it is ready.

Submitted by sithara_1989699 on Mon, 01/11/2021 - 08:36

Hi delphine.coille,

Thank you very much

Submitted by sithara_1989699 on Thu, 01/21/2021 - 05:53

Hi delphine.coille,

I am kindly waiting for your example.

Thank you.

Submitted by delphine.coille on Fri, 01/22/2021 - 09:23

Hi sithara_1989699,

I will work on the example update together with Bonita 2021.1. which will be released on January 28th. Thanks for your patience until then :-)