Inconsistent behaviour at MessageEventReceivedCmd?

Hi,

Somebody knows why MessageEventReceivedCmd is able to send async messages only when no process variables is passed?

In other words, when I call the constructor MessageEventReceivedCmd(String messageName, String executionId, boolean async), I can set that async but I can’t pass process variables along.

But, if I call MessageEventReceivedCmd(String messageName, String executionId, Map<String, Object> processVariables), async is always set to false at MessageEventReceivedCmd:52.

I noticed that async attribute doesn’t have a setter method.

I wonder if it was by purpose. If not, should I overload the constructor to accept async too?

Thanks

Hi,

When making a message event element async, a job is created in the database to handle the message received trigger. This job is currently not able to store the received variables and retrieve them again when the job is executed. This could be a good feature to have. If you would like to see it being added, you can create a Github issue on the Flowable engine project.

Best regards,

Tijs

Thanks Tijs, I’ve just added the issue: https://github.com/flowable/flowable-engine/issues/306.

I wondered if those variables should be stored in variable table (former ACT_RU_VARIABLE), since a job is not an execution. Would you change the contraint between execution table and variable table or create a new table for job variable?

Thanks. The first thoughts were to serialize the variables to the job configuration column, so the job is able to access the variables when executing.

Best regards,

Tijs