How to avoid MNI

Hi All,

Is is best practice to use MNI's in appian , if we need to avoid this could suggest me the ways to so ?

Thanks,

Bhargavi

  Discussion posts and replies are publicly visible

  • Hi Bhargavi,

    There are couple of things when we go for loop and when we go for MNI but before that Could you please explain us your actual scenario (use case)? People can share their thoughts based on use case that you have.
  • Hi Bhargavi,

    MNI:
    1. Use the null check before running MNI
    2. Design your model to run a node less than 1000 times
    3. If its a heavy process choose run one instance at a time to handle the load.

    To avoid MNI:
    We can use manual looping with Xor gateway

    Please refer this similar post:
    community.appian.com/.../mni-vs-looping-for-start-process-smart-service
  • Hi bhargavip0001,

    docs.appian.com/.../Process_Model_Recipes.html

    When you want to start multiple sub-processes at the same time you should use Multiple Node Instances (MNI) functionality on the Start Process smart service. The main reason for doing this is that the Start Process smart service will manage load on the system by spreading the newly started processes across all execution engines.

    Regards,
    Krishna
  • Hi Bhargavi,

    It depends on what you are trying and on which node. In most other cases we choose to go for MNI or Looping flow based on the following considerations,

    1. If its a UI node places between activity chaining then check here

    2. if its on a script task the same can be converted into a expression rule making use of looping functions.

    3. If its a process then using start process smart service with MNI is suggested to distribute load. An alternative to achieve the same is  running process start process smart service in loop,  the drawback is that it will occupy more memory space in terms of process memory  and analytics data  but the same can be avoided by deleting the previously completed instances and marking variables hidden.

    Based on previous experiences We choose to go for MNI when the no of execution is less than 10 when its more than that we go for looping flows.

  • Hi ,

    It depends on the requirement, to choose either MNI or Looping. If you could share requirement here, folks will suggest the best approach.
  • I would also add that a lot of things which used to require MNI to handle in-process can now be handled with a!forEach calls inside a script task. Not everything of course, but smartly designing this sort of thing can vastly cut down on MNI calls compared to what we had to do back in the day.
  • back in portal days MNI was good weapon to deal with the looping logic . rather than implementing the looping logic with xor , increament count script task. But after introduction of apply function (and then replaced by for each) MNI has minimul usage. below are some usage of MNI
    1. If you want to assign the user input task in everyone of group (one on one user task mapping )
    2. if you want to call the sub process node for each item in list
  • Ideally, MNI's are not suggested as they increase load on server and has limitation beyond 1000 records (though this scenario can be handled by using excel spreadsheets). To suggest on further alternatives, can you explain your requirement in detail so that fellow practitioners can put forth their ideas.

    Thanks.
  • Hi Bhargavi,

    As explain the ways based on appian versions. There are multiple ways to avoid MNI or use MNI but it totally depends on requirement and appian version. So if it possible share your requirement then people can help you better.

    Regards
    Abhay Giri
  • Hi Bhargavi,

    Yes, as others have suggested the best alternative will depend on the scenario. Looping through using an xor may be an appropriate substitution.

    Thanks,
    Philip Stout