aowss
December 26, 2023, 7:13pm
1
Hi,
is there an example of a Spring Boot application ( version >= 3.1 ) using Camunda ( version >= 8.3 ) with REST Connector with unit test ( JUnit 5 and Wiremock ) ?
The most important part for me is the unit test part.
I tried to create such an application but with no success: camunda/spring-boot/rest-connector at rest-connector · aowss/camunda (github.com)
Thanks,
Aowss
aowss
December 29, 2023, 9:18pm
2
I double checked and the connector is making the request; the request is matched by wiremock; the response is sent back; the connector is able to create the variable with the right value
but I still get the following error:
2023-12-29T16:10:40.230-05:00 WARN 29352 — [ault-executor-0] .DefaultCommandExceptionHandlingStrategy : Retrying {command=class io.camunda.zeebe.client.impl.command.CompleteJobCommandImpl, job={“key”:2251799813685281,“type”:“io.camunda:http-json:1”,“customHeaders”:{“retryBackoff”:“PT0S”,“resultExpression”:“={ exchangeRate: response.body.rate }”},“processInstanceKey”:2251799813685262,“bpmnProcessId”:“Process_RESTConnector”,“processDefinitionVersion”:1,“processDefinitionKey”:2251799813685250,“elementId”:“Task_CallExchangeRateAPI”,“elementInstanceKey”:2251799813685274,“tenantId”:“”,“worker”:“HTTP REST”,“retries”:1,“deadline”:1703884539343,“variables”:"{"url":"http://localhost:9999/exchangeRates\“,\“method\”:\“GET\”,\“headers\”:{\“accept\”:\“application/json\”},\“authentication\”:{\“type\”:\“noAuth\”},\“queryParameters\”:{\“fromCurrency\”:\“USD\”,\“toCurrency\”:\“CAD\”,\“amount\”:1000},\“connectionTimeoutInSeconds\”:\“20\”,\“apiURL\”:\“http://localhost:9999/exchangeRates\”,\“fromAmount\”:1000,\“toCurrency\”:\“CAD\”,\“fromCurrency\”:\“USD\”}”,“variablesAsMap”:{“url”:“http://localhost:9999/exchangeRates”,“method”:“GET”,“headers”:{“accept”:“application/json”},“authentication”:{“type”:“noAuth”},“queryParameters”:{“fromCurrency”:“USD”,“toCurrency”:“CAD”,“amount”:1000},“connectionTimeoutInSeconds”:“20”,“apiURL”:“http://localhost:9999/exchangeRates”,“fromAmount”:1000,“toCurrency”:“CAD”,“fromCurrency”:“USD” }}, currentRetryDelay=71} after error of type ‘UNAVAILABLE’ with backoff
aowss
January 2, 2024, 5:33pm
3
The problem seems to be with this line in SpringConnectorJobHandler
:
new CommandWrapper(commandStep, job, commandExceptionHandlingStrategy).executeAsync();
aowss
January 3, 2024, 6:02pm
4
It turned out to be the fact that i was not waiting for the process to end.
The impression i got was different because i was debugging.
I find the error not very clear.
The example has been updated in camunda/spring-boot/rest-connector at main · aowss/camunda · GitHub
system
Closed
January 18, 2024, 9:08am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.