Problem to return a boolean value from an external service task worker to the BPMN process

Hello everyone, this is my first post, I would like to ask for your help about a problem on an external service task.

I would like my worker to return a boolean value to the bpm process via the command line;

  • externalTaskService.complete(externalTask, Collections.singletonMap(“Exist”, Exist));

but the java console returns this error which occurs exactly when I get to this line :

  • 1034324 [TopicSubscriptionManager] ERROR org.camunda.bpm.client - TASK/CLIENT-03004 Exception on external task service method invocation for topic ‘t-verify-îf-data-exist’:

  • org.camunda.bpm.client.exception.NotResumedException: TASK/CLIENT-01009 Exception while completing the external task: The corresponding process instance could not be resumed. Reason: status code: 500, reason phrase: {“type”:“ProcessEngineException”,“message”:“condition expression returns non-Boolean: result has class java.lang.String and not java.lang.Boolean”}

This problem occurs at the first external service task. Can you help me with this please?

I am sending you my java maven class and the bpm as an attachment.

Thank you in advance for your help :grinning:

NVerifyIfDataExistWorker.txt (3.2 KB) Test_SqlConnection.bpmn (15.4 KB)

I’ve already searched a lot and came across these 2 topics that I tried but they didn’t work:

Hi @LittleDeveloper
Welcome to the forum!

The main problem is that the expressions in your gateways are wrong.
$(Exist) should be ${Exist} - you should go through your process and change all the brackets.

1 Like

Hello @Niall Niall,

thank you for your quick response!! :grinning:
Indeed it was indeed that, now I don’t have any more error of this type thank you!!

the data recovery still doesn’t work but I suspect my nested Try{} Catch{}. I will come back to you if I don’t find the solution.

Thanks also for your video tutorials which are very well done. :+1: