I want to split the xml file by 5,000 records. Furthermore, I need to merge the files back to one pdf file. I can split the xml file by each record but I am not sure how to accomplish by 5k. I am sure it goes into the “for-each” but I can’t find the syntax for it.
I have one more question in regards to this. Because the file I am using is very large and that’s the reason I am needing it to split. Unfortunately, workflow is saving that file in memory. I would like to split the files in JavaScript and save it in disk space. Afterwards drop a trigger file that would start another process. What’s the best possible way to accomplish this task?
Not sure I understand what you mean by “Unfortunately, workflow is saving that file in memory”. As I stated in my reply, the code I posted must be used in the XML Splitter task (not the XSLT task). The splitter then creates as many distinct files as the result of the transform code dictates (creating them on disk, not in memory) and the rest of the process loops though each of these files just like any splitter task does.
I am using an xml splitter task. It actually writes to “Wrote file:///C%3A%2FProgramData%2FObjectif%20Lune%2FPlanetPress%20Workflow%208%2FPlanetPress%20Watch%2FDebug%2Fxml00ZYWDGFTKAQI01%2F000000001.xml”
No, that’s a file, and it’s only the first file in the loop.
For testing purposes, try putting a Send To Folder task immediately after the Splitter task. You’ll see that after running the process, that destination folder will contain as many small files as the splitter created.