Opening FormModel throws errors after migration

Hi, after the migration to 2024.06 through the SME our FormModels throw errors when trying to open them. These errors are for example “Internal Error: Screen “/ExampleScreen” was not found!” which is probably caused by our models not having the property “dependentScreenElements”. When Adding the property the error is resolved but it has to be added by hand which seems wrong to me.
The second error seems to be caused by a12 code that tries to work with the array modelPath that is undefined. The following errors are two examples:

TypeError: Cannot read properties of undefined (reading ‘children’)
at Object.format (interpreter.js:41:50)
at getExpressionValue (expression-cell-value.js:24:52)
at getExpressionCellValueInUI (expression-cell.js:68:59)
at ExpressionCell (expression-cell.js:37:29)
at renderWithHooks (react-dom.development.js:16305:18)
at mountIndeterminateComponent (react-dom.development.js:20069:13)
at beginWork (react-dom.development.js:21582:16)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)

TypeError: Cannot read properties of undefined (reading ‘map’)
at Object.toString (path.js:59:27)
at evaluateStateAttributeField (elementState.js:122:92)
at Object.evaluateFieldNotRelevant (elementState.js:53:28)
at isControlHidden (hidden.js:140:44)
at isHiddenElement (hidden.js:81:16)
at isHidden (hidden.js:53:27)
at eval (hidden.js:56:33)
at Array.every ()
at isHidden (hidden.js:56:18)
at eval (hidden.js:56:33)

What can we do to fix this behaviour?

Hi,

After the engine extraction, Client will by default only apply post-processing to document models. Post-processing for other models (like form models in your case) needs to be activated explicitly by adding a ModelProcessor that “knows how to process” a specific model type.

For form models, this processor is now is exported by Form Engine (and not Client anymore).

Since your issue sounds like the post-processing for form models might be missing (dependentScreenElements is a property that the processor would have added), please check whether the FormModelProcessor is used in your model loader.

Works like a charm now. Thank you very much :smiley: