Get wait states from REST API

Hello.

In a Camunda SpringBoot web layer test, i can do:

String response = restTemplate.getForObject(aUrl, String.class);

for url (e.g):

http://localhost:58495/engine-rest/process-instance/1466fe82-47cb-11ec-ae0c-9cb6d0f889eb/activity-instances

giving me a json string where i can see my wait states. I cant seem to figure out which type of object i can match the json respone to, e.g.:

ActivityInstanceImpl[] response = restTemplate.getForObject(aUrl, ActivityInstanceImpl[].class);

gives my the error:

Cannot deserialize value of type [Lorg.camunda.bpm.engine.impl.persistence.entity.ActivityInstanceImpl;from Object value (tokenJsonToken.START_OBJECT); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type [Lorg.camunda.bpm.engine.impl.persistence.entity.ActivityInstanceImpl;from Object value (tokenJsonToken.START_OBJECT)

From Get Activity Instance | docs.camunda.org i assumed that ‘ActivityInstance(Impl)’ should be the right target type, but it seems it is not.

P.S.: The same code (‘restTemplate.getForObject(…)’) works fine for e.g. fetching an array of ‘TaskEntity’.

Can you help me?

Hello @Stefan_Schulz ,

the thing you might be looking for is the org.camunda.bpm.engine.rest.dto.runtime.ActivityInstanceDto. This is the Java Object transferred via REST Api.

I hope this helps

Jonathan