I'm having a problem getting my failedJobRetryTimeCycle to be honored for exceptions thrown by a http-connector service task. I've configured my Camunda test environment as:
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
<property name="expressionManager">
<bean class="org.camunda.bpm.engine.test.mock.MockExpressionManager"/>
</property>
<property name="processEnginePlugins">
<list>
<bean class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
<bean class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
</list>
</property>
<property name="customPostBPMNParseListeners">
<list>
<bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
</list>
</property>
<property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
</bean>
<bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
I've configured my serviceTask as
<bpmn2:serviceTask id="send_mir_done_service_task" name="Send MIR Done">
<bpmn2:extensionElements>
<fox:failedJobRetryTimeCycle>R10/PT10M</fox:failedJobRetryTimeCycle>
<camunda:connector>
<camunda:connectorId>http-connector</camunda:connectorId>
<camunda:inputOutput>
<camunda:inputParameter name="url">${'
http://localhost:8800/AirDone/'}${air_id}${'/'}${mir_review_code}</camunda:inputParameter>
<camunda:inputParameter name="method">POST</camunda:inputParameter>
However when I run against a non-existent http server I get an exception in my test case:
org.camunda.bpm.engine.ProcessEngineException: Exception while invoking connector HTCL-02007 Unable to execute HTTP request
at org.camunda.connect.plugin.impl.ServiceTaskConnectorActivityBehavior.execute(ServiceTaskConnectorActivityBehavior.java:58)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:27)
I would have expected the fox:failedJobRetryTimeCycle to catch the error and hold the job for re-try. Am I doing something wrong? Is this the expected behavior?
One more question, is it possible to configure the http-connector to return a variable on an exception so that my BPM process can catch it and process the error rather than throwing a Technical Exception?
David