Hi, I tried this https://www.flowable.org/docs/userguide/index.html#bpm10minutetutorial to create a sample project. After that I inserted a service task between the two user tasks and made a java delegate class for that service task.
Now when i start the process, it gets completed without waiting for the completion of the first user task.
How can I make my service task wait and proceed after the user claims and completes the first user task?
Hey @Varun,
Can you perhaps share your BPMN XML?
From what you have explained the service task should wait on the completion of the user task before running.
Cheers,
Filip
Hey @filiphr
This is my bpmn file…
<process id="financialReport" name="Monthly financial report reminder process">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="writeReportTask" />
<userTask id="writeReportTask" name="Write monthly financial report" >
<documentation>
Write monthly financial report for publication to shareholders.
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>accountancy</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="writeReportTask" targetRef="random" />
<serviceTask id="random"
name="service_task"
flowable:class="com.org.flowable.CallExternalSystemDelegate"></serviceTask>
<sequenceFlow id="flow4" sourceRef="random" targetRef="verifyReportTask" />
<userTask id="verifyReportTask" name="Verify monthly financial report" >
<documentation>
Verify monthly financial report composed by the accountancy department.
This financial report is going to be sent to all the company shareholders.
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow3" sourceRef="verifyReportTask" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
Is something wrong with that ?
Hey @Varun,
The BPMN looks OK to me and it should work as expected. When you start the process you will stop in the “Write monthly financial report” User Task, then once you complete that task you would go in the Service Task and then stop in the “Verify monthly financial report” User Task. The process would complete once you complete the second task.
Please double check that the new definition is deployed in the engine.
Cheers,
Filip
1 Like