Computations after A12 update to 2023.06-ext3

Hey,
we currently updated our project to the new A12 version 2023.06-ext3. And now we have some problems with some computations. They are sometimes failing strangely.
So one example we have a computation that has a precondition

[../../Premium/PreliminaryGrossPremium/GrossPremiumTotalCosts/GrossTotalPremiumTC] > 0

and then the calculation

[../../Premium/PreliminaryGrossPremium/GrossPremiumTotalCosts/GrossTotalPremiumTC]

and this is set to the field

/EventCancellationContract/Contract/CoverageOptions/CoverageOptionsPolicy/GrossTotalPremiumTC

so just “put the value from this field in that field” the first time this is triggered it works. But then when I adapt the form again and then after that the computation is triggered again it does not work and I get an error


there are 2 different possible causes. The first one is the page where the field which is in the precondition is in. the second one is the page where the field which should be set is in. The field which should be set has still the old value (because the computation was not triggered).

But the strange thing here is: if I close the whole form and then open it again. it works again.
(if it is important we are using CDM models)

Do you know what could be the problem here?

Best regards
Lara

In addition to what was already written and/or said, we realize that for our project using ActivityActions.loadData in our client code does not trigger computation reload anymore after upgrading to this above mentioned A12 version

While investigating I noticed that when a form activity is loaded the computation is not triggered either… only dirty form state triggers computations via FORM-ENGINE-EVENT (VALUE_CHANGE)

We had a look into the issue and it appears because data is reloaded with custom code into the same activity in the frontend. In those cases, calculations are not triggered in the Form Engine.
The reporter will try to apply the experimental API to programmatically trigger recalculation (introduced with A12-11742 in 2023.06). In the CDM case it could also help to reload the complete dataset (eg by replacing the existing activity as done in this discourse thread) However, this will not work for “regular” documents. If there is no need to persist the calculated fields, setting them to “Transient” would work in this situation as well.