Java Service Task

I have followed the documentation closely
Tutorial: Camunda Enterprise Edition for Java Developers (Video 2) - YouTube,

@Niall has also made a tutorial, I have imitated it, but I still get an error message, could you maybe help me where is the problem

Can you upload the model?

Hi @Niall take

Can you upload the file - i need to see the execution semantics

i cann not uplead the bpmn i don’t know why

Hey @Niall You can change the extension instead of png you can open .bpmn and then with the moodler open
Thank youu !

because strangely I can’t download a file I can only pictures

Can you put the xml of the model into a code block?

<?xml version="1.0" encoding="UTF-8"?>

<bpmn:definitions xmlns:bpmn=“” xmlns:bpmndi=“” xmlns:di=“” xmlns:dc=“” xmlns:xsi=“” xmlns:camunda=“” id=“Definitions_1” targetNamespace=“” exporter=“Camunda Modeler” exporterVersion=“4.11.1”>
<bpmn:process id=“SimpleDemo” name=“SimpleDemo” isExecutable=“true”>
<bpmn:startEvent id=“StartEventProcessStarted” name=“Process started”>
<bpmn:endEvent id=“EndEventProcessEnded” name=“Process ended”>
<bpmn:sequenceFlow id=“SequenceFlow1” sourceRef=“StartEventProcessStarted” targetRef=“Gateway_1yvl4kg” />
<bpmn:serviceTask id=“Activity_1594k8j” name=“check weather” camunda:class=“com.camunda.demo.SimpleDemo.CheckWeatherDelegate” />
<bpmn:exclusiveGateway id=“Gateway_1yvl4kg” name=“is the weather ok ?”>
<bpmn:sequenceFlow id=“Flow_1uxm6es” name=“Yes” sourceRef=“Gateway_1yvl4kg” targetRef=“EndEventProcessEnded”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>#{weatherOk}</bpmn:conditionExpression>
<bpmn:sequenceFlow id=“Flow_1cqnadc” name=“No” sourceRef=“Gateway_1yvl4kg” targetRef=“Activity_14x0kb2”>
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>#{not weatherOk}</bpmn:conditionExpression>
<bpmn:serviceTask id=“Activity_14x0kb2” name=“Print Complaint about weather” camunda:class=“com.camunda.demo.SimpleDemo.LoggerDelegate”>
<bpmn:endEvent id=“Event_0tisaa7”>
<bpmn:sequenceFlow id=“Flow_093tpze” sourceRef=“Activity_14x0kb2” targetRef=“Event_0tisaa7” />
<bpmndi:BPMNDiagram id=“BPMNDiagram_1”>
<bpmndi:BPMNPlane id=“BPMNPlane_1” bpmnElement=“SimpleDemo”>
<bpmndi:BPMNEdge id=“SequenceFlow_08va5r8_di” bpmnElement=“SequenceFlow1”>
<di:waypoint x=“198” y=“300” />
<di:waypoint x=“515” y=“300” />
<dc:Bounds x=“337.5” y=“110” width=“90” height=“20” />
<bpmndi:BPMNEdge id=“Flow_1uxm6es_di” bpmnElement=“Flow_1uxm6es”>
<di:waypoint x=“565” y=“300” />
<di:waypoint x=“782” y=“300” />
<dc:Bounds x=“665” y=“282” width=“18” height=“14” />
<bpmndi:BPMNEdge id=“Flow_1cqnadc_di” bpmnElement=“Flow_1cqnadc”>
<di:waypoint x=“540” y=“275” />
<di:waypoint x=“540” y=“110” />
<di:waypoint x=“620” y=“110” />
<dc:Bounds x=“548” y=“190” width=“15” height=“14” />
<bpmndi:BPMNEdge id=“Flow_093tpze_di” bpmnElement=“Flow_093tpze”>
<di:waypoint x=“720” y=“90” />
<di:waypoint x=“782” y=“90” />
<bpmndi:BPMNShape id=“Gateway_1yvl4kg_di” bpmnElement=“Gateway_1yvl4kg” isMarkerVisible=“true”>
<dc:Bounds x=“515” y=“275” width=“50” height=“50” />
<dc:Bounds x=“498” y=“335” width=“84” height=“27” />
<bpmndi:BPMNShape id=“Activity_0c9rbzm_di” bpmnElement=“Activity_1594k8j”>
<dc:Bounds x=“330” y=“260” width=“100” height=“80” />
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement=“StartEventProcessStarted”>
<dc:Bounds x=“162” y=“282” width=“36” height=“36” />
<dc:Bounds x=“160” y=“318” width=“41” height=“27” />
<bpmndi:BPMNShape id=“EndEvent_0fkea3f_di” bpmnElement=“EndEventProcessEnded”>
<dc:Bounds x=“782” y=“282” width=“36” height=“36” />
<dc:Bounds x=“780” y=“318” width=“41” height=“27” />
<bpmndi:BPMNShape id=“Activity_0p7p3r0_di” bpmnElement=“Activity_14x0kb2”>
<dc:Bounds x=“620” y=“50” width=“100” height=“80” />
<bpmndi:BPMNShape id=“Event_0tisaa7_di” bpmnElement=“Event_0tisaa7”>
<dc:Bounds x=“782” y=“72” width=“36” height=“36” />

Sorry - there was a problem with the settings, you should be able to upload your BPMN file now.

process.bpmn (4.9 KB)

her we go Mercii @Niall

Ok, i’ve found the problem. The sequence flow seems to skip the service task.
You can fix it by changing the flow connections

1 Like

I have corrected my mistakes Thank youuu for your @Niall but I get another error message

Can you show the actual error message?

Hi @chahramane_hafid ,

the problem shown in the screenshot does not seem to come from Camunda rather than your Injector.

Please have a look here: java - Error injecting: org.apache.maven.plugin.war.WarMojo - Stack Overflow


1 Like

Thank you @jonathan.lukas The problem got resolved after manually configuring one of the recent war plug-ins in POM.xml.

1 Like