Registry Event - definition in event file or in process


I’m working with the event registry - and trying to figure out what should be defined in the .event files and what must be defined in the specific task in the process.

I created a .event file with a payload - and when debugging - i can see it is read and the event definition is created with my payload definition.

I’m using this event in one of my processes - and when debugging - i can see that the payload of the definition is built from what is defined in the task - and not taken from the model i defined in the .event file.

I was trying to add a correlation parameter dynamically to all send events - instead of setting it up on each send task in each flow (by overriding the SendEventParserHandler) - and i see the model is created ok.
But when the task is executed - the parameter names are compared to the payload definition - which is taken from the task - so since i did not define the parameter there - it does not add the payload.

I’m sure i’m missing something - but i dont really understand what is the purpose of the payload and correlation in the .event file .

Will appreciate any advice on this

Hey @iadded,

In 6.6 we merged the payload and correlation from the .event file and now there is a boolean flag on the payload saying whether the parameter is part of the correlation or not.

When sending events the correlation parameter is not needed. The correlation parameters are only used for receiving events (Event Registry Start, Boundary Event Registry, Receive Event, etc.)

Some good materials to get started with the event registry is:

Hope this helps,

Thanks Filip
The issue i had here was different.
I configured a parameter in my payload in the .event file.
In the sendEventTask - i did not add the inParameters - i did that by overriding the SendEventParseHandler - and adding the parameter in code (so i dont have to do it for each task separately).
The issue was that in the code that actually builds the payload - the names of the parameters added to the payload are compared to the EventModel payload - but instead of this model being taken from the .event file - the model is built from the json of the SendEventTask - and since this does not include my payload parameter (as i added it in code during parsing) - the parameter is not sent.

Is this changed in version 6.6.0 as well ?

Thanks for such a wonderful support

No, this is the same. You would have to update your model that’s cached in the engine to be able to handle the code you have.

Thank you for the kind words :-).

Thanks for the reply
It is actually working for me in version 6.6.0