Failed job - Cannot resolve an incident of type failedJob through service

Hi, with the service how I can resolve the incidents , I tried this method in the service

public boolean resolveStuckActivityIncident(String incidentId) {

    try {

        this.runtimeService.resolveIncident(incidentId);

    } catch (Exception ex) {
        return false;
    }
    return true;
} 

I am getting false value when i hit the api and in the cockpit the incidents are retrying fine when manually done , In the db all the incidents are type of failedjobs or failedExternalTask. please tell me how to resolve these type of incidents through the service not manually.

Hi @Mandeep8
What exception do you get in the catch (Exception ex)? Can you share the exception?

Regards,
Alex

Hi @Alex_Voloshyn I am getting BadUserRequestException.

I would check the correctness of the incidentId value.

The value for the incidentId is correct , I verified @Alex_Voloshyn

Can you try to resolve the same incident id with the Rest API and check if it works?

Hi, I tried with the api call ,
but its not resolving by the service , manually its getting resolved.

What response do you get from the REST call?

I am getting a Boolean value as false.

What response do you get from the REST call? - my question is about the response you get from the REST API call not from your code.

I tried with the api call , but its not resolving by the service

Can you share the rest API call resposnse?

@Mandeep8
I just re-read the initial question and summary and realized the answer might be there.

[Failed job - Cannot resolve an incident of type failedJob through service]

According to the official documentation - An incident of any type, except for failedJob and failedExternalTask , can be resolved by calling RuntimeService#resolveIncident .

Seems like the expected behavior.

Hi Alex, for failed job and failedExternalTask , we can’t resolve through service?

Hi @Mandeep8
yes, according to the documentation - Incidents | docs.camunda.org

okay Alex,Thanks for your reply.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.