cancel
Showing results for 
Search instead for 
Did you mean: 

Rest post

mtail
Champ in-the-making
Champ in-the-making
I make a post with the rest api. And in response I get the following error.
Here my code :

               String uri = REST_URI + "/runtime/process-instances";
      JSONStringer jsRequest = new JSONStringer();
      
      jsRequest.object()
            .key("processDefinitionId").value(processDefinitionId)
            .key("variables").array().object()
            .key("name").value("LoanId")
            .key("value").value("132312")
            .endObject().endArray();
      
      jsRequest.endObject();
      
      Representation representation = new StringRepresentation(jsRequest.toString(), MediaType.APPLICATION_JSON);
      
      System.out.println("Representation : " + representation.toString());
      
      // Do post
      representation = getClientResource(uri).post(representation);
      …

The error :
Avertissement: Exception or error caught in status service
java.lang.NoSuchFieldError: TENANT_ID
   at org.activiti.rest.service.api.runtime.process.BaseProcessInstanceResource.<clinit>(BaseProcessInstanceResource.java:46)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Could someone please help me?
Thank's
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
You seem to have a different version of the activiti-engine jar and activiti-rest jar on the class path. TENANT_ID has been added to ProcessInstanceQueryProperty in 5.15 *I think*, make sure both engine and rest are running the same version…

It's works.
Thank's for your help

frederikherema1
Star Contributor
Star Contributor
No worries. I recommend using maven (or another dependency-management tool) to make sure all dependencies are the right version…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.