OR

Hey guys! is there any way to make this cleaner?

I have to many OR and probably there is a better way to do this, so what i need is:

 OR to go to a path in case it finds a status or the other one if it doesn't find it

then i need that in both cases it goes back to the script contador that its just an index+1 and iterates

  Discussion posts and replies are publicly visible

  • +1
    Certified Lead Developer
    1. Don't use OR gateways, always use XOR.  If you don't know the difference, you should be using XOR.  For reference: I've been doing process models for 10 years and I don't remember the last time I used an OR gateway - probably more than zero times, but not much.
    2. All 3 of the OR gateways at the end of your model after "Script Task" could probably be condensed into 1 gateway (maybe 2, i'm not clear what the logic requirement is).  Are you required to have the separate End and Terminate nodes at the end, or can they all be Terminates?  Again it's not really all that clear what you need here.
  • +1
    Certified Lead Developer

    Hi, it depends on what exactly is happening within your Script Task, but it looks like it may be a good candidate for using MNI (multiple node instances) which you can use to run a script task multiple times iterating through a list. See here for more detail

  • Agree with XOR vs OR, in my 13 years working with Appian I've never used an OR.  You can place all of your logic in order within an XOR and I would do something like below. 

    First XOR can route to the terminating end event - and ONLY use non-terminating on a side path which should keep the process active when it's flow is completed. If the path should end the process, make it a terminating end node.

    Then your second XOR can handle the logic to either route back to the script task, or to complete the process.  The logic from the other OR (XOR) nodes will be moved in to what order you want them evaluated in the remaining ones.

  • 0
    Certified Lead Developer
    in reply to Chris
    ONLY use non-terminating on a side path which should keep the process active when it's flow is completed

    glad to see we're in agerement on that approach.  i've gone so far as to beg Appian to allow us to make "terminate" the default setting for End Nodes, as they're what i use in roughly 90% of cases.

  • glad to see we're in agerement on that approach.  i've gone so far as to beg Appian to allow us to make "terminate" the default setting for End Nodes, as they're what i use in roughly 90% of cases.

    I would be on board with that!

    I can't count the times we've had a process "stuck" because there was a node with an error which was restarted, without the error instance cancelled, and the process doesn't close out due to a non-terminating end node..