Trying to get REST working

Hey hello

Total beginner here …

I tried to change the loan-request example and switched the user process to a rest process. I just want to see if the engine make the rest request.

However when I try to redeploy I get the following error

ENGINE-16004 Exception while closing command context: ENGINE-09005 Could not parse BPMN process. Errors: 
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | loan-request.bpmn | line 12 | column 73
org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors: 
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | loan-request.bpmn | line 12 | column 73
        at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(
        at org.camunda.bpm.engine.impl.util.xml.Parse.throwExceptionForErrors(
        at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(
        at org.apache.tomcat.util.threads.TaskThread$

The process is simple as that:

<?xml version="1.0" encoding="UTF-8"?>
    <bpmn:definitions xmlns:bpmn="" xmlns:bpmndi="" xmlns:di="" xmlns:dc="" xmlns:camunda="" xmlns:xsi="" id="Definitions_1" targetNamespace="">
      <bpmn:process id="approve-loan" name="Validation d&#39;emprunt" isExecutable="true">
        <bpmn:startEvent id="StartEvent_1" name="Loan request received">
        <bpmn:sequenceFlow id="SequenceFlow_0wbi1t6" sourceRef="StartEvent_1" targetRef="ServiceTask_15ik8lg" />
        <bpmn:endEvent id="EndEvent_0a4s9no" name="Loan request approved">
        <bpmn:sequenceFlow id="SequenceFlow_0gal2s2" sourceRef="ServiceTask_15ik8lg" targetRef="EndEvent_0a4s9no" />
        <bpmn:serviceTask id="ServiceTask_15ik8lg" name="Approuver emprunt">
                <camunda:inputParameter name="url"></camunda:inputParameter>
      <bpmndi:BPMNDiagram id="BPMNDiagram_1">
        <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="approve-loan">
          <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
            <dc:Bounds x="233" y="267" width="36" height="36" />
              <dc:Bounds x="206" y="303" width="90" height="20" />
          <bpmndi:BPMNEdge id="SequenceFlow_0wbi1t6_di" bpmnElement="SequenceFlow_0wbi1t6">
            <di:waypoint xsi:type="dc:Point" x="269" y="285" />
            <di:waypoint xsi:type="dc:Point" x="528" y="285" />
              <dc:Bounds x="346" y="275" width="90" height="20" />
          <bpmndi:BPMNShape id="EndEvent_0a4s9no_di" bpmnElement="EndEvent_0a4s9no">
            <dc:Bounds x="796" y="267" width="36" height="36" />
              <dc:Bounds x="769" y="303" width="90" height="20" />
          <bpmndi:BPMNEdge id="SequenceFlow_0gal2s2_di" bpmnElement="SequenceFlow_0gal2s2">
            <di:waypoint xsi:type="dc:Point" x="628" y="285" />
            <di:waypoint xsi:type="dc:Point" x="796" y="285" />
              <dc:Bounds x="712.5" y="275" width="90" height="20" />
          <bpmndi:BPMNShape id="ServiceTask_15ik8lg_di" bpmnElement="ServiceTask_15ik8lg">
            <dc:Bounds x="528" y="245" width="100" height="80" />

And finally versions seems ok:

  • 7.4.0 for the server
  • 0.6.0 for the modeler
  • Kepler for eclipse

Any pointers ?



Back …

Soooo I resolved my problem by adding manually in the XML process file the following:

<bpmn:serviceTask id="ServiceTask_15ik8lg" name="Approuver emprunt" camunda:type="external">

And I got it working … I also had to add the method and headers accordingly to the rest example.

So my question turns into how do I specify the camunda:type="external" from the modeler ?




just to clarify do you want to use a Camunda connector to call a REST service. Or do you want to use external tasks which you have to poll by yourself? Your first post looks like you want to use a connector. Your fix in the second post changes the service task to an external task.



by the way I’m able to deploy your BPMN XML from your initial post without parsing exception. How did you configure your engine? Did you use a distro from or did you configure your own engine? If the later did you enable the connect process engine plugin?


Hey Sebastian

Yes I am actually trying to make a rest request to feed a rest service with information from the workflow. So as far as I understand I was actually trying to work with a connector.

I checked my conf/bpm-platform.xml and it missed the org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin .

Now that I added it I was able to remove the camunda:type="external" and it works as you said.

Now I changed the method to POST and I’m trying to get the workflow variables flowing to the rest service. Is that even possible ? (I can’t find any reference to it in the doc…).

Anyway congrats for the great piece of software.


Hi Eriam,

for an example how to use variables for a POST request have a look at the SOAP example. It uses a freemarker template as payload. In the freemarker template you can access process variables by there name. Please make sure the freemarker template engine is installed in your environment.

Does this help you?



It helps a lot, thanks.

I got everything working smoothly but had to fallback to an inline script since I cannot manage getting the right url to refer the script to. Anyway since I’m just posting to a rest service an inline script is fine.

All the best !



you can read more about resources paths for scripts in the scripting section of the user guide. They either have to be part of the classpath or the deployment.


Hey thanks

Yes, I went through that topic but still couldn’t figure it out. I’ll try again later today after a fresh restart and a couple of coffees.