Hello,
I am facing a problem regarding the REST API. I am trying to add a process via POST request as documented here.
My process is defined in XML-format in the file process.xml and looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
namespace="http://www.example.org/MinimalExample"
expressionLanguage="java"
xmlns="https://www.omg.org/spec/BPMN/20100501/BPMN20.xsd"
<process processType="Private" isExecutable="true" id="com.sample.HelloWorld" name="Hello World">
<startEvent id="_1" name="StartProcess" />
<scriptTask id="_2" name="Hello" >
<script>System.out.println("Hello World");</script>
</scriptTask>
<endEvent id="_3" name="EndProcess" >
<terminateEventDefinition/>
</endEvent>
</process>
</definitions>
I am trying to add this process via the API with the following command:
curl -X POST -H "deployment-name: hello-world" -H "enable-duplicate-filtering: false" -H "deploy-changed-only: false" -H "deployment-source: process application" --data-binary "@process.xml" http://localhost:8080/engine-rest/deployment/create
However, I always get the same error message:
{"type":"NotSupportedException","message":"RESTEASY003065: Cannot consume content type"}
Can anyone help me with my problem? I don’t really see what’s wrong with either the defined process or the POST request.
Thanks in advance,
David