Unable to insert incident in act_ru_incident

Hi folks,

I am trying to create a custom incident and trying to insert to db , but I can see incident is created successfully but there is no record coming in db .Here is my sample code

    try {
      executeEnd(execution)
    } catch {
      case e: Exception =>
        val inc=HFEngineFacadeInstance.facade.runTimeService.createIncident(FailedProcessIncidentHandler.FAILED_PROCESS_INCIDENT, execution.getId, "", e.getMessage)
        println(">>>>>>>>>>>>>>>>>>>>>"+inc)
        throw ValidationException(message = e.getMessage)

    }

Here is my custom incident hander clss

public class FailedProcessIncidentHandler implements IncidentHandler {

public static final String FAILED_PROCESS_INCIDENT = "failedProcess";

@Override
public String getIncidentHandlerType() {
    return FAILED_PROCESS_INCIDENT;
}
@Override
public Incident handleIncident(IncidentContext context, String message) {
    System.out.println("Inside failed process Handler");
    IncidentEntity inc = IncidentEntity.createAndInsertIncident(FAILED_PROCESS_INCIDENT, context, message);
    inc.getPersistentState();
    return (Incident) inc;
}

@Override
public void resolveIncident(IncidentContext context) {
}

@Override
public void deleteIncident(IncidentContext context) {
}

}

Problem is when I am looking for record in act_ru_incident table , there is no record inserted.

What was the solution for this??

Hi @aarushi.m, did you get any solution for this issue? I am facing same issue.