What is the difference between And Or Xor Gateways?

Anybody Can Explain?

  Discussion posts and replies are publicly visible

  • XOR:

    This gateway is used to bifercate the flow. It is actually if else condition where we need to write the conditions inside that. For instance if you want to run flow something like, In the insurance claim flow, if the claim amount iin between 500 and 1000 dollers then you want to handover it to manger for approval, if the amount is more than 1000 then you want to send them to the another level then you can mention this conditons in the XOR Gate.

    OR:

    This gateway is used to bifercate the flow into multiple flows based on the condition. It is actually multiple if conditions. At a time multiple conditions will statisfy and can trigger different parallal flows.

    AND:

    If you want ot distribute a flow with no conditions. For instance at a time you want to do three paralal tasks like insert a record in the database, sending an email to customer, post an even to the news feed. All these can be done at the same time then you can use AND gate.

    AND gate can be used in two ways.

    1) Running parallal task 

    2) Combining multiple flows in the process model into one single flow.

     

    You can get detailed description in the Appian documentation. Thanks this may help

  • Hi,

    OR: This gateway is used for One or more path can enter based on the condition. If the condition is true then only the path will be executed.
    XOR: XOR gateway is similar to OR gateway but it only have one out going flow. In brief, Multiple incoming paths but single outgoing path.

    Find the below attached link it might help for you
    community.appian.com/.../or-vs-xor-gateway
  • 0
    Certified Lead Developer
    One important thing to understand about merging flows with an AND gateway is that it forces the flow to wait for all parallel flows to complete and reach the AND gateway before it will continue. It's actually useful where needed to use this functionality to block process flow from continuing.

    If you want a process to loop back on itself without complications you need to use a Script Task or User Input Task, even if it's a script task that doesn't do anything. An OR or XOR gate will work fine for the first loop and then crash thereafter. But an empty Script Task before an XOR gateway can be looped any number of times.
  • Hi tirumalar,
    OR Gateway: An OR Gateway directs incoming flows to one of many possible output paths, based on the condition(s) you set.
    If all conditions evaluate as False, you can also specify a path to follow. If any condition has an output that can't be
    evaluated as either True or False, the node does not open any output paths.
    XOR Gateway: The exclusive (XOR) gateway connects one incoming path with a single outgoing path. The outgoing path is chosen from
    a number of possible paths and determined by one or more conditions that you set.
    When multiple incoming flows are connected to the XOR gateway, it allows the first flow token through to an exclusive
    outgoing flow. Subsequent flow tokens wait for all incoming flows to arrive before executing the output flow decision.
    Thanks,
    ravalik
  • 0
    Certified Lead Developer
    Hi Tiru !

    More Details you can find here regarding Gateways.
    docs.appian.com/.../Gateways.html

    AND :

    College Chairman wants to Apply for the Accreditation to one department like Computer Science. Regarding this chairman asked College Principal and concerned Head of the department to review the Accreditation Application and send it to him, so that he can submit to the Government. In this case the document should be reviewed by HOD and Principal. So, we can have two review paths one for HOD and the other for Principal, which can be split by 'and'. Both the paths are needed to be completed before we proceed further, so we can use 'and' gateway here.
    In a one line : AND : Execute multiple tasks in parallel.

    OR
    OR gateway directs incoming flows to one of many possible output paths based on the condition you put.

    XOR
    This node allows one incoming path to continue, while executing any others.

    COMPLEX :
    this node allows you to selectively accept/restrict incoming paths and evaluate rules to determine outgoing paths.

    Thanks,
    Ravi.
  • XOR means

    if(condition)

    {

    }

    else if(condition)

    {

    }

    else if(condition)

    {

    ]

    else

    {

    }

    OR gate: -

    if(condition)

    {

    }

    if(condition)

    {

    }

    if(condition)

    {

    }

    no else 

  • what if have 10 conditons in xor and all are true which conditon xor choose

  • 0
    Certified Senior Developer
    in reply to parvezk0001

    I am bit confused why you reply to 4 year old topic which is obviously solved...

  • 0
    Certified Lead Developer
    in reply to parvezk0001

    It takes the first true condition