Deploying problem

Hi everybody! I have a problem with deploy my project Camunda platform.

This is code of model.

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_17mpxw8" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
  <bpmn:process id="weather" name="Weather" isExecutable="true" camunda:versionTag="0.1">
    <bpmn:startEvent id="StartEvent_1" name="Указать город">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="city" label="Город" type="string" defaultValue="Moscow,ru" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:outgoing>Flow_1aolq1u</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_1aolq1u" sourceRef="StartEvent_1" targetRef="Activity_1tyc2w6" />
    <bpmn:serviceTask id="Activity_1tyc2w6" name="Получить данные">
      <bpmn:extensionElements>
        <camunda:connector>
          <camunda:inputOutput>
            <camunda:inputParameter name="url">http://api.openweathermap.org/data/2.5/weather?q=${city}&amp;appid=8a1c6703023c2366117dbba551cf9ed7
						</camunda:inputParameter>
            <camunda:inputParameter name="headers">
              <camunda:map>
                <camunda:entry key="Content-type">application/json</camunda:entry>
              </camunda:map>
            </camunda:inputParameter>
            <camunda:inputParameter name="method">GET</camunda:inputParameter>
            <camunda:outputParameter name="response">
              <camunda:script scriptFormat="JavaScript">S(response)</camunda:script>
            </camunda:outputParameter>
            <camunda:outputParameter name="statusCode">
              <camunda:script scriptFormat="JavaScript">statusCode</camunda:script>
            </camunda:outputParameter>
          </camunda:inputOutput>
          <camunda:connectorId> http-connector</camunda:connectorId>
        </camunda:connector>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1aolq1u</bpmn:incoming>
      <bpmn:outgoing>Flow_0gmvkuw</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="Gateway_14dbx6h" name="Что надеть?">
      <bpmn:incoming>Flow_0gmvkuw</bpmn:incoming>
      <bpmn:outgoing>Flow_1asexlf</bpmn:outgoing>
      <bpmn:outgoing>Flow_0fmlonh</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_0gmvkuw" sourceRef="Activity_1tyc2w6" targetRef="Gateway_14dbx6h" />
    <bpmn:sequenceFlow id="Flow_1asexlf" name="&#62; -10" sourceRef="Gateway_14dbx6h" targetRef="Activity_07hrlab">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${response.prop("main").prop("temp").numberValue() -273.15 &gt; -10}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_0fmlonh" name="&#60;= -10" sourceRef="Gateway_14dbx6h" targetRef="Activity_1a5k6hh">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${response.prop("main").prop("temp").numberValue() -273.15 &lt;= -10}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:endEvent id="Event_1lzqurd">
      <bpmn:incoming>Flow_1vk6tp2</bpmn:incoming>
      <bpmn:incoming>Flow_1wjvorh</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1vk6tp2" sourceRef="Activity_1a5k6hh" targetRef="Event_1lzqurd" />
    <bpmn:sequenceFlow id="Flow_1wjvorh" sourceRef="Activity_07hrlab" targetRef="Event_1lzqurd" />
    <bpmn:userTask id="Activity_07hrlab" name="Надеть куртку">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="temp" label="Температура" type="string" defaultValue="${response.prop(&#34;main&#34;).prop(&#34;temp&#34;).numberValue()}" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1asexlf</bpmn:incoming>
      <bpmn:outgoing>Flow_1wjvorh</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:userTask id="Activity_1a5k6hh" name="Надеть шубу">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="temp" label="Температура" type="string" defaultValue="${response.prop(&#34;main&#34;).prop(&#34;temp&#34;).numberValue()}" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0fmlonh</bpmn:incoming>
      <bpmn:outgoing>Flow_1vk6tp2</bpmn:outgoing>
    </bpmn:userTask>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="weather">
      <bpmndi:BPMNEdge id="Flow_1wjvorh_di" bpmnElement="Flow_1wjvorh">
        <di:waypoint x="630" y="120" />
        <di:waypoint x="740" y="120" />
        <di:waypoint x="740" y="262" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1vk6tp2_di" bpmnElement="Flow_1vk6tp2">
        <di:waypoint x="630" y="430" />
        <di:waypoint x="740" y="430" />
        <di:waypoint x="740" y="298" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0fmlonh_di" bpmnElement="Flow_0fmlonh">
        <di:waypoint x="450" y="342" />
        <di:waypoint x="450" y="430" />
        <di:waypoint x="530" y="430" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="449" y="383" width="33" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1asexlf_di" bpmnElement="Flow_1asexlf">
        <di:waypoint x="450" y="292" />
        <di:waypoint x="450" y="120" />
        <di:waypoint x="530" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="452" y="203" width="26" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0gmvkuw_di" bpmnElement="Flow_0gmvkuw">
        <di:waypoint x="370" y="317" />
        <di:waypoint x="425" y="317" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1aolq1u_di" bpmnElement="Flow_1aolq1u">
        <di:waypoint x="214" y="317" />
        <di:waypoint x="270" y="317" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="178" y="299" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="161" y="342" width="71" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0alj2kk_di" bpmnElement="Activity_1tyc2w6">
        <dc:Bounds x="270" y="277" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_14dbx6h_di" bpmnElement="Gateway_14dbx6h" isMarkerVisible="true">
        <dc:Bounds x="425" y="292" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="499" y="307" width="63" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1lzqurd_di" bpmnElement="Event_1lzqurd">
        <dc:Bounds x="722" y="262" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_19ge5p7_di" bpmnElement="Activity_07hrlab">
        <dc:Bounds x="530" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1iz3mj4_di" bpmnElement="Activity_1a5k6hh">
        <dc:Bounds x="530" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

And I have the next problem:

ENGINE-09005 Could not parse BPMN process. Errors: 
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | resource diagram_1.bpmn | line 13 | column 68 [ deploy-error ]

Can youhelp me?

Hi @Aleksandr_Ermolaev,

You should decide what implementation for service task to go with. It can be Java code or external implementation to be used (external task).

Please have a look at below docs
https://docs.camunda.org/manual/7.16/reference/bpmn20/tasks/service-task/

1 Like