ST-DBP-025 - Variables Serialization Prerequisite cannot be fixed

I have a ClassificationResult variable whose scope is limited to a sequence, let’s call it Sequence1. Sequence1 is within a larger sequence, let’s call it Sequence2, in which I have a “Wait For Document Classification Action and Resume” activity that is outside of Sequence1. I still get the error “Non-serializable variable ‘ClassificationResult’ in activity ‘Sequence2’ present in scope of persistence activity ‘Wait For Document Classification Action and Resume’.”

According to the link below, this rule checks “if there are any variables that are not serializable in the scope of the following persistence activities or in the scope of their parent activities.” This is not true for my case (the variable is in a different child activity of the parent), yet I’m still getting the error.
Studio - ST-DBP-025 - Variables Serialization Prerequisite (uipath.com)

Is this workflow on your main/entry point or is it on another workflow?

These workflows are on the Main, in one of the states of the state machine.

Is it just a rule thats failing, or is this stopping the code from compiling?

It’s just a rule that is called out during our code reviews. It’s not stopping the code from compiling, which is good; it’s just not correct.

Just noticed this in the UiPath Academy:



Not sure if this is a more accurate description of the rule, but I am currently running a process as I described above, where the non-serializable variable is in a parent scope but not in the scope of the long-running activity, and it appears to be working as designed.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.