How to access case that instantiates a process when over

I have 2 diagrams , the first one ends with a "end message event" and instantiate another process in a different diagram.
How can i access the bdm of the first process in the second one?
And a how can i see how are they related ?

Hi,

You should send the persistenceId of the business object in the message content to be able to retrieve it in the second process using the findByPersistenceId query.

EDIT: Here is an example using Bonita Studio 2022.1

HTH
Romain

Sorry for the trouble, but could you provide me an example please? I've been trying to do it but with no luck.

 

I’ve added an example in the answer.
I recommend following the Getting started tutorial if you are discovering Bonita.

HTH
Romain