FileSystemService.SaveXML method using external XSD

Lets imagine you have a workflow with ContextStore A and final step SaveData with method SaveXML of FileSystemService service. What has to be done to produce valid XML datastructure according to some external schema?

  1. create XSD data structute where you copy your external XSD definition
  2. in ContextStore A set property DataType to XML and Structure to whatever XSD datastructure you have already created
  3. in final step where you save your data with SaveXML method, map ContextStore A with property CastToDataType set to XML

If you do it in such a way, then you get local file with valid and correct XML structure. But when you for example in final step change property CastToDataType to String, then you get bad result in the way, that no XML tags will be produced in output file.

If any question feel free to ask.