Http-worker not working

For some reason this does not seem to work for me

The following is the BPMN file I am having

<?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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0le0y58" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Zeebe Modeler" exporterVersion="0.8.0">
  <bpmn:process id="order-process" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1" name="Order Placed">
      <bpmn:outgoing>SequenceFlow_0830dqf</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="SequenceFlow_0830dqf" sourceRef="StartEvent_1" targetRef="Task_0ao0bhh" />
    <bpmn:serviceTask id="Task_0ao0bhh" name="Initiate-Payment">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="initiate-payment" />
		<zeebe:taskHeaders>
			<zeebe:header key="url" value="http://52.157.78.85:5000/initiate-payment" />
			<zeebe:header key="method" value="GET" />
		</zeebe:taskHeaders>
      </bpmn:extensionElements>
      <bpmn:incoming>SequenceFlow_0830dqf</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1o629z7</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="SequenceFlow_1o629z7" sourceRef="Task_0ao0bhh" targetRef="IntermediateThrowEvent_1af5tmm" />
    <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_1af5tmm" name="Payment-Received">
      <bpmn:incoming>SequenceFlow_1o629z7</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1swyb5o</bpmn:outgoing>
      <bpmn:messageEventDefinition messageRef="Message_1totzx8" />
    </bpmn:intermediateCatchEvent>
    <bpmn:exclusiveGateway id="ExclusiveGateway_0dv1eow" name="Order Value?" default="SequenceFlow_0ouw937">
      <bpmn:incoming>SequenceFlow_1swyb5o</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0ouw937</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_0ajrtf8</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="SequenceFlow_1swyb5o" sourceRef="IntermediateThrowEvent_1af5tmm" targetRef="ExclusiveGateway_0dv1eow" />
    <bpmn:sequenceFlow id="SequenceFlow_0ouw937" sourceRef="ExclusiveGateway_0dv1eow" targetRef="Task_1phembu" />
    <bpmn:serviceTask id="Task_1phembu" name="Ship Without Insurance">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="ship-without-insurance" />
		<zeebe:taskHeaders>
			<zeebe:header key="url" value="http://52.157.78.85:5000/ship-without-insurance" />
			<zeebe:header key="method" value="GET" />
		</zeebe:taskHeaders>
      </bpmn:extensionElements>
      <bpmn:incoming>SequenceFlow_0ouw937</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1kkdfdx</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_0t8v8pe" name="Ship With Insurance">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="ship-with-insurance" />
		<zeebe:taskHeaders>
			<zeebe:header key="url" value="http://52.157.78.85:5000/ship-with-insurance" />
			<zeebe:header key="method" value="GET" />
		</zeebe:taskHeaders>
	  </bpmn:extensionElements>
      <bpmn:incoming>SequenceFlow_0ajrtf8</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1ivnipu</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="SequenceFlow_0ajrtf8" name="&#62; $100" sourceRef="ExclusiveGateway_0dv1eow" targetRef="Task_0t8v8pe">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">orderValue &gt;= 100</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:exclusiveGateway id="ExclusiveGateway_143b70k">
      <bpmn:incoming>SequenceFlow_1kkdfdx</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_1ivnipu</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0188kxu</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="SequenceFlow_1kkdfdx" sourceRef="Task_1phembu" targetRef="ExclusiveGateway_143b70k" />
    <bpmn:sequenceFlow id="SequenceFlow_1ivnipu" sourceRef="Task_0t8v8pe" targetRef="ExclusiveGateway_143b70k" />
    <bpmn:endEvent id="EndEvent_0c7u663" name="Order Fullfilled">
      <bpmn:incoming>SequenceFlow_0188kxu</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="SequenceFlow_0188kxu" sourceRef="ExclusiveGateway_143b70k" targetRef="EndEvent_0c7u663" />
  </bpmn:process>
  <bpmn:message id="Message_1totzx8" name="Payment-Received">
    <bpmn:extensionElements>
      <zeebe:subscription correlationKey="orderId" />
    </bpmn:extensionElements>
  </bpmn:message>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="order-process">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="179" y="109" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="165" y="152" width="66" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0830dqf_di" bpmnElement="SequenceFlow_0830dqf">
        <di:waypoint x="215" y="127" />
        <di:waypoint x="270" y="127" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_1xxb57r_di" bpmnElement="Task_0ao0bhh">
        <dc:Bounds x="270" y="87" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1o629z7_di" bpmnElement="SequenceFlow_1o629z7">
        <di:waypoint x="370" y="127" />
        <di:waypoint x="452" y="127" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="IntermediateCatchEvent_0k89ihr_di" bpmnElement="IntermediateThrowEvent_1af5tmm">
        <dc:Bounds x="452" y="109" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="447" y="152" width="48" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_0dv1eow_di" bpmnElement="ExclusiveGateway_0dv1eow" isMarkerVisible="true">
        <dc:Bounds x="575" y="102" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="567" y="78" width="65" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1swyb5o_di" bpmnElement="SequenceFlow_1swyb5o">
        <di:waypoint x="488" y="127" />
        <di:waypoint x="575" y="127" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0ouw937_di" bpmnElement="SequenceFlow_0ouw937">
        <di:waypoint x="625" y="127" />
        <di:waypoint x="720" y="127" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ServiceTask_0t78qco_di" bpmnElement="Task_1phembu">
        <dc:Bounds x="720" y="87" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ServiceTask_0i1evfu_di" bpmnElement="Task_0t8v8pe">
        <dc:Bounds x="720" y="200" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0ajrtf8_di" bpmnElement="SequenceFlow_0ajrtf8">
        <di:waypoint x="600" y="152" />
        <di:waypoint x="600" y="240" />
        <di:waypoint x="720" y="240" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="599" y="193" width="35" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_143b70k_di" bpmnElement="ExclusiveGateway_143b70k" isMarkerVisible="true">
        <dc:Bounds x="915" y="102" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1kkdfdx_di" bpmnElement="SequenceFlow_1kkdfdx">
        <di:waypoint x="820" y="127" />
        <di:waypoint x="915" y="127" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1ivnipu_di" bpmnElement="SequenceFlow_1ivnipu">
        <di:waypoint x="820" y="240" />
        <di:waypoint x="940" y="240" />
        <di:waypoint x="940" y="152" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="EndEvent_0c7u663_di" bpmnElement="EndEvent_0c7u663">
        <dc:Bounds x="1062" y="109" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1045" y="152" width="72" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0188kxu_di" bpmnElement="SequenceFlow_0188kxu">
        <di:waypoint x="965" y="127" />
        <di:waypoint x="1062" y="127" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

I have a python flask service created for the tasks and I do not see them invoked

This is what I am expecting: When I create an instance then the first task in the workflow should be automatically called using the url values and then wait for a message to be sent.

What am I doing wrong?

@S.Gopalakrishnan4 is your python server an HTTP server or a Zeebe Worker?

Shouldn’t be using the HTTP worker for that task type?

If you are using the Zeebe HTTP Worker to service this task you need to set the task-type to HTTP in the model or configure the ZEEBE_WORKER_DEFAULTTYPE for the worker.

@jwulf Thank you for your response in both places

If I understand correct - I have specified the url for the job type “initiate-payment-http”
I am trying to issue the zbctl activate jobs initiate-payment-http

The error message is
Error: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Just to clarify:
I have a small python flask application which is up and running in the same VM where I have zeebe/broker and comundo/operator running

Also, when I manually call the service from the browser everything works very well

I am trying to figure out how I can have zeebe configured so that the services are called automatically - eventually I will use the same concept to containerize the services

BTW, if it does not show up - I am new to zeebe

  1. Start the Zeebe HTTP Worker, make sure it can connect to your Zeebe broker.
  2. Change all your task types to HTTP - that is the task type that the Zeebe HTTP Worker will activate and work on.
  3. Deploy the new model to the broker.
  4. zbctl create instance order-process
1 Like