Can't get the REST API to work

Hi community,

I am very new to developing in general and Camunda as well. I am trying to build a very small business process that invokes a DMN table to evaluate some variables.
I got the whole thing up an running and when I am in the Camunda Cockpit I can also start the process manually and it all works like a charm.
Now I want to use it over the REST API and here is my problem. I can use the
Get: http://localhost:8080/engine-rest/deployment call to get my deployment and it returns exactly what I want

[
    {
        "links": [],
        "id": "59f006ad-41b5-11ea-98e0-00d861146428",
        "name": "EvaluationProcess",
        "source": "process application",
        "deploymentTime": "2020-01-28T11:02:54.186+0100",
        "tenantId": null
    }
]

But If I now try to use that ID to invoke some other REST call, like start the process again with different variables.
http://localhost:8080/engine-rest/process-definition/{59f006ad-41b5-11ea-98e0-00d861146428}/start
I always get this error:

{
    "type": "RestException",
    "message": "Cannot instantiate process definition {59f006ad-41b5-11ea-98e0-00d861146428}: no deployed process definition found with id '{59f006ad-41b5-11ea-98e0-00d861146428}': processDefinition is null"
}

Can anybody point me in the right direction of what I am doing wrong? I am sure I just overlooked something but it has been two days and I just don’t know what else to try.

Thank you so much!

You just need to key of the process you deployed. A deployment can have more than one model in it, so the id you’re using doesn’t reference the model at all.

If you take a look at rest API it shows that you can just take the Key of your deployed process to start is

http://localhost:8080/engine-rest/process-definition/key/aProcessDefinitionKey/start

where aProcessDefinitionKey is defined in your process model.

Thank you for the fast answer, that looks like the link I was missing. Using the ID from the modeler as key worked!

1 Like