I got bad news from you :-). Batch processing by design does not age any of the values that you can try to set in steps, especially the payload.
When I started working with him, I also expected to have a session variable in full phase in the correct state, but it’s not, they are completely destroyed at every step.
Now I don’t think it’s a mistake, but it’s really a design function that I can understand, even if I really don’t like it. I solved the same problem using the object storage connector .
This will allow you to access the API store of the mule objects through a good XML configuration block, so you can store in memory variables that you can recover after completion in your entirety without exposing them to the flow logic.
Hope this helps
source share