Restart a service task via java API which has no incident

Hi All,

Does anyone knows any way to restart a service task which has failed for some reason?
I tried using processEngine.getManagementService().activateJobById(jobId) but this only works if we have entry in ACT_HI_INCIDENT table for the process.

we are using execute() method to run a service task.
execute method code looks something like this:

try{
//do some work
}catch(){
//handle if fails
}

How can we restart service task if it doesn’t have entry in ACT_HI_INCIDENT table?

Thanks in advance !