After further investigation, I found that the root cause may not be the EJB mapping function but a step before. The mapping is called in a referenced subprocess and that might be the problem. Question:
I have a master process called M which uses a (referenced) subprocess called S. They both are in first version and 100 M instances were created, 30 of them already reached S (and therefore 30 S instances are created too).
After that I deploy version 2 of both processes. Obviously, new instances of process M will be created upon version 2 and when they reach S new version 2 of the subprocess will also be created.
The point is: for the remaining 70 M instances (created before v2 deploy), which did not reach subprocess S, should I expect that when they do the engine will instantiate version 1 of S or version 2 (the newest)?
If the latter is the correct answer, this is the root cause of my problem...
Best,
Ricardo Giacomin