Is is best practice to use MNI's in appian , if we need to avoid this could suggest me the ways to so ?
I am generating a pdf file for each record in an array of data records and using MNI on the "Generate PDF from Template" smart service for this to iterate through the array. There may be 1 to 10 records at any time in the array when it is invoked. Also I am setting the instances to run one at a time. I don't see any performance issues. I am using MNI only because it is convenient. Is this a bad idea from a design perspective? Should I replace with an XOR gateway?
No, I wouldn't go with an XOR loop - this is a reasonable case for MNI usage, as long as you don't end up with problems storing your generated documents into a PV.
Yeah keep in mind that an XOR loop is actually worse than using MNI. Part of the reason MNI is often not recommended is that it requires Appian to store execution information for each time the node executes. If you end up with a node running 500 times, this can end up being quite a bit of data. However, using an XOR loop is worse because now you have to run your node 500 times AND run the XOR gateway 500 times. So generally the recommendation is try a!forEach() first - if you can't use that, use MNI, and use an XOR looping flow as a last resort.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.