AND Gateway - A real life usage of AND gateway.

Certified Senior Developer

Hi all,

here am looking for a real life use-case for AND gateway.

my understanding is AND gateway allows us to execute a specific set of tasks in parallel, so does this means we will have multiple controls running in process model at a given particular time ?


Share, Learn & Grow

  Discussion posts and replies are publicly visible

  • Hello Preji,

    To answer your question, yes this allows you to execute multiple tasks in parallel. You don't have to specifically add multiple controls. Depending in your use case you maybe want to kill one of the parallel path before the whole process finishes. What happens is that multiple paths execute in the same instance ( multiple threads).

    You should be careful about the variables been used on each path (thread).

    There are multiple good reasons to make parallel processing of tasks.

    For example:
    * Let say you have en on boarding process which requires approval from multiple areas. So instead of asking for the approvals one after another you can request the approval to all the required areas at the same time.
    * Lets say you have multiple integrations over the night and you have a limited window to execute those integrations. So, you want to be "time efficient" then you want to execute everything in parallel.
    * In the same integration you have to process multiple operations at the same time, each operation requires large amount of time. So, you want to execute all the operation at the same time (Add, update, delete).
    * Lets say you need to send email with the taskid first the task needs to be created before you send the email so you start the task and in parallel after 1 minute timer you query the taskid then you send the email with the taskId.

    Sometimes there are other techniques or solutions to the same problem but these are some examples to use the AND.

    Let us know if you have some special use case which can be interesting to discuss

  • As per Appian, "The AND Gateway directs all incoming workflow(s) to all of the possible branches. If more than one incoming path is used, all incoming paths must reach the node before the process can continue. It is also used to join all incoming paths."

    It means AND gate ensures that all parallel tasks are completed before going forward with further processing.
    For e.g. During financial year end, an auditing firm would like to process its debts, credits, assets and take appropriate approvals from respective directors before generating the reports for the CXOs. All said processes can run in parallel and once the approvals are in place, Appian can generate FY report and send to the CXOs.

    Hope it answers your query.
  • Hi ,

    Technically AND gateway is useful when ,
    1.There is a need to execute all the branches (Output path) without any condition in parallel.
    2.There is a need to wait for all incoming paths to be completed before taking next action.

    Mohamed Thoufiq.
  • Preji P (prejip)  Following are the detailed usage as per the Appian academy. I hope its visual representation describes is usage with respect to diverge (Fork) and converge (Join).

  • Hi Preji,
    I can give an example for this. An organisation needs a document to be reviewed by manager and chairman before proceeding to next step. In this case we can have two review paths one for manager and one for chairman, which can be split by 'and'. Both the paths are needed to be completed before we proceed further so we can use an 'and' gateway here. Of course there are other ways to achieve this functionality, I am just trying to give you an example for your understanding.
    Hope this helps.
  • 0
    Certified Lead Developer

    You can take an example of Employee On-boarding Process, where a candidate will go through various phases of approvals in order to get on-boarded into an organization once after completion of pre-onboarding process.

    Consider we have following departments: HR, IT and Admin and the candidate's request need to go through all these three levels of approval where workflow for each department can be triggered immediately once after completion of pre-onboarding process, hence we need to trigger all these 3 processes in parallel. But the flow should only terminate when all these 3 departments have completed their work, till that onboarding process will be in-progress and the flow will hold at Joining point (i.e. AND Gateway).

    Here each department is a separate set of actors who will be working on this flow.

    In this use case, you can use AND Gateway to split the flow into three path, where each path will trigger a sub-process for their respective department. And we will again join all these 3 flows into a single AND Gateway, this will make sure that, you flow do not proceeds further unless Admin, IT and HR have completed their work/tasks.

    For more information, please refer to AND Gateway Documentation

    Hope this helps.

  • 0
    Certified Senior Developer
    in reply to antogladvinj3315

    That's odd , And Gateway runs all of the outgoing Paths ,Try running the process again .

  • Tried disabling chain ,It Stopped in And Gate, But is same

  • 0
    Certified Senior Developer
    in reply to antogladvinj3315

    The Only thing i can think of right now is ,Does the Paths really Coming out of AND gate (Check once that the paths linked to AND gate properly?)