How to retry a failed task instance in community edition

Hi,

I am using the community edition of bonita. There's a way in documentation to retry a failed connector instance (https://documentation.bonitasoft.com/bonita/7.11/handle-a-failed-activity#toc2). 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

Hi,

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

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

Hello
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.search.Order;
import org.bonitasoft.engine.search.SearchOptions;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.search.SearchResult;
import org.bonitasoft.engine.session.APISession;

 

processAPI.retryTask(failedTaskId);

 

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.

 

Regards

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 https://community.bonitasoft.com/error-management-bos this example. but the downloading link seems to be corrupted. 

Thank you.

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.

Hi delphine.coille,

Thank you very much

Hi delphine.coille,

I am kindly waiting for your example.

Thank you.

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 :-)