How to configure/activate retry plugin in Spring process application

Hi All,
I am trying to implement below retry mechanism.

https://github.com/camunda/camunda-bpm-examples/tree/master/process-engine-plugin/failed-job-retry-profile

However, I am unsure how to use below component in my project (Spring process application).
In example it says to configure in camunda.cfg.xml. In my project I dont have any camunda.cfg.xml

Hi @camundaabhishek,

See the following link for how to configure process engine plugins in a shared engine scenario: https://docs.camunda.org/manual/7.10/user-guide/process-engine/process-engine-plugins/#configure-process-engine-plugins

Cheers,
Thorben

Hi @thorben,

I have started working on Camunda and kindly excuse for my limited knowledge.

I found following in the given link.

  1. In my project (spring process application), I don’t have bpm-platform.xml file
    Therefore, I am confused how to make use of it.

  2. I am using Tomcat Server .

  3. Using Spring Beans XML. Following is my applicationContext.xml
    Seems this could be best place to activate the plugin but still not sure what to do here.

  1. Programatically ( Any example will be appreciated)

My Project structure (After many attempts I manage to run this project with spring process application)

Hi @thorben,

Also, I found below piece of code in forum which says how to add plugins dynamically. Also it says that the plugin should be added to engine before engine built. Therefore, wondering that where I can make use of this code.

SpringProcessEngineConfiguration conf = new SpringProcessEngineConfiguration(); List<ProcessEnginePlugin> processEnginePlugins = new ArrayList<>(); processEnginePlugins.add(CamundaReactor.plugin()); conf.setProcessEnginePlugins(processEnginePlugins);

In my application process application class is as below.

@ProcessApplication
public class SpringServletProcessApplication extends ServletProcessApplication {

  @PostDeploy
  public void startProcess(ProcessEngine processEngine) {
    System.out.println("Invoking @PostDeploy annotation in " + getClass().getName());
    System.out.println("Starting testResolveBean processdefinition");}

  @PreUndeploy
  public void remove() {       
  }
}