I am facing a new problem after finally being able to to deploy my custom process via the API. I was able to add my custom process to the /deployment endpoint of the API. Now I would like to start this process, but as far as I can tell, I have to add it to /process-definitions first, which I am unable to do. Can anyone tell me how to accomplish this?
I added the model to the deployment via an API query like this: curl -X POST -F "deployment-name=hello-world" -F "enable-duplicate-filtering=false" -F "deploy-changed-only=false" -F "deployment-source=process application" -F "data=@process.xml" http://localhost:8080/engine-rest/deployment/create
My setup is just the demo setup, nothing more.
All I want is to be able to start that process. It should print “Hello World” once.
Since I want to be able to upload a model via its xml representation, I did not use the Camunda Modeler to build it. What part looks incorrect about it?
I have tried, but I get a 404 - Not Found error. I suspect that is because my model has been added to /deployment but not to /process-definition.
The modeler generates the XML automatically - you can switch to on a tab at the bottom.
It’ll help you avoid syntax errors so i would suggest not building you model via XML if you can help it.
When you first deploy something it becomes a deployment - executable bpmn files are taken form the deployment and added to the process definitions at which point you can start them.
Most of it. It should looks something closer to this
I deployed the process using curl -X POST -F deployment-name=hello-world -F enable-duplicate-filtering=false -F deploy-changed-only=false -F deployment-source=process-application -F data=@payload_camunda.xml http://localhost:8080/engine-rest/deployment/create.
I can see the process is deployed by calling curl http://localhost:8080/engine-rest/deployment, which gives me the following output for this process:
I was able to deploy the process without any problems, so there could be something wrong with your curl.
Have you tried just deploying via the modeler?
That worked. Wow. Well, I still have to find out how to get the curl-query to the API to work though, but at least I know the definition is correct now. Thanks again for your help and your time @Niall!