Rest-engine/message error message is not clear enough

Hello,

I am trying a very simple process with a catch event to simulate an external human task.
When I POST on the rest-engine/message to trigger the catch event and advance in my process flow I receive a HTTP 400 with a body of {
“type”: “InvalidRequestException”,
“message”: “”
} and nothing more.

My boyd for the post is simply {
“messageName”: “MessageSBPerso”,
“businessKey”: “ID6”
}

If I remove the messageName key the error message explicitely tells me of the missing key but I have no more information.

So 2 questions:
How can I set more logging in the Engine to be able to see more info?
What are the mandatory key for this kind of mesasge body?

Thanks a lot
William

Hi @RezoApio,

Are you sure that your combination values of messageName & businessKey are correlated to exactly one entity.

Can you try to re-call rest-engine/message with “all” attribute set to true as in below
{
“messageName”: “MessageSBPerso”,
“businessKey”: “ID6”,
“all”: true
}

Hi,

Thanks for your answer. I had a try already with the all option but still no luck.

Hopefully these 3 screenshots will clarify my situation :

Thanks again.

Kind regards,

William

PS: Had to make 1 picture only as I am a new user. Hope you can still read it.

Hi @RezoApio,

It might be due to an error thrown by the service task following the catch message. so try to set camunda:asyncBefore to “true” for the service task as in below example

<serviceTask id="service1" name="Test Service" camunda:asyncBefore="true" camunda:class="my.custom.Delegate" />

Hi,

I have this message now Unexpected character (’ ’ (code 160)): was expecting double-quote to start field name
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 2, column:

Hi @RezoApio,

Could you please send the complete error stack. It seems related to the service task.

Could you please share your model.

demobanette.bpmn (8.7 KB)
Please find my model here.

Could you please tell me how to get the complete stack trace? The only thing I have at the server level is a warning about my model for a default flow.

2021-05-28 06:30:03.387 WARN 946 — [nio-8080-exec-1] o.g.jersey.server.wadl.WadlFeature : JAXBContext implementation could not be found. WADL feature is disabled.
2021-05-28 07:04:03.154 WARN 946 — [nio-8080-exec-5] org.camunda.bpm.engine.util : ENGINE-09004 Warnings during parsing:

  • Exclusive Gateway ‘Gateway_1w27e43’ has outgoing sequence flow ‘Flow_023sbe1’ without condition which is not the default flow. We assume it to be the default flow, but it is bad modeling practice, better set the default flow in your gateway. | resource demobanette.bpmn

HTH
Regards,
William

Hi @RezoApio,

Have you managed to locate the error using cockpit?
Does incidents tab shows any incidents?

Log files of the application server should contain more details. May I know more details about your platform installation.

Hi @hassang,

There is no error message in cockpit at all, nor incidents. All I have is the process instance shown waiting as a small blue number on the Catach event task.

re my installation, it is the simplest of all as I am only doing a very quick (hopefully) POC. I have installed the camunda 7.15 tar.gz on an Openstack Debian 10 compute and let it run with all the default options.
If you are able to help me increase the log level for this setup I would greatly appreciate it.

I have found that the latest error was from my json body that was containing invalid UTF8 character. Probably due to a silly copy/paste from a html page :wink:

So my current status is that I have been able to send some message and they were catched by the process. So far so good, even if unfortunaltely I have not fully understood how it worked.

I will continue to work on that.

Thanks a lot for your help.

Kind regards,
William

1 Like

Faced the same issue here.
Sharing the solution for who might end up in the same situation: i had commented code in my json body :face_with_hand_over_mouth:
But the error message should at least mention “bad json format” or something