When executing the pipeline
IAssociateCategoryToParentPipeline, there is a step that checks if there are any validation errors in
This will cause an update to fail even if the messages were in place before the pipeline was initiated, which seems counterintuitive.
Is there a way to "refresh" the commerce context, or create a clone of it with an empty message list?
Observed in XC 9.0-Update 1.
AssociateCategoryToParentBlock, which call
CreateRelationshipCommand.Processcalls the static method
Command.PerformTransaction, and that calls
- ValidationTransaction looks for the existence of a message with a code of "ValidationError", and if one is found, rolls back the transaction. So as long as there are any ValidationErrors in this list, any call to this command, and by extension
AssociateCategoryToParentPipeline, will fail to persist updates.