Error publishing workflow. Workflow XAML failed validation due to the following errors: The total size of the activity XAML including the referenced XAML is greater than the maximum allowed size of 102400 KB.
This is a common error which can occur when you’re building a complex workflow in Nintex for O365.
Let’s first give a little bit of context about this error.
Nintex for O365 uses SharePoint 2013 workflows in the background. SharePoint 2013 workflows use XAML files. When you save a Nintex workflow, the workflow gets converted to a XAML file.
When you get this error, the only thing you can do is optimizing your workflow or splitting it up by using child workflows.
We can optimize our workflow in multiple ways, to reduce the size, so that we can eventually save it and don’t get the XAML error anymore.
Some actions take more size than other ones. Removing “log” or “set a variable” actions do not free up a lot of space.
One of the most XAML size consuming actions in Nintex for O365 is the “Send a task” or “Send a task process” action. If you have 15 to 20 task process actions in your Nintex workflow, you know where the cause is.
Try optimizing your Nintex workflow, by removing some task actions from your main workflow by putting them in a child workflow. Run that child workflow from your main flow.
If you don’t want to do this, you can first try to remove other easier actions. Remove some and try to publish again. If you don’t have luck, you will be forced to remove some Nintex actions that take more XAML size.
Eventually, you will be able to publish your workflow without XAML errors.