Calculated attributes refresh each time the entity containing them is retrieved from the database (which happens when a page is opened, when an entity is committed with page refresh, and in many other instances). The reason the construct you describe above doesn’t work is because Entity B is not being refreshed (re-retrieved from the database) when you change entity A.
I am not sure what your use case is, but a couple of thoughts that may be helpful:
Perhaps if you could describe your use case in more detail, the community could suggest some ways to accomplish what you need to.
Hope that helps,
Mike
Refresh rate is upon reshowing the calculated attribute in a UI
Well, the After some experimenting, the calculated attribute stays fixed when:
This is not as expected nore described in docs.mendix.com
It does get recalculated after:
So now I am back where I started and recalculation is working ok. But why was it not the first time?
Maybe you just ran into a updating-calculated-attribute-bug and if you can reproduce it, report it at support.mendix.com
Response to FWIW/OTOH: Mendix does lazy-update B-attrib upon changing A, which does not impact preformance since only upon refreshing the page showing B does trigger the Cal_B_AttribB-microflow and only for this particular attrib. So the UI's have a listener. That mechanism seems to be in place but not entirely functioning.