Skip to main content
Question

Consider a process with three parallel approval tasks assigned to three different users. You need to design the process so that if any one user completes their task, the other two pending tasks are automatically canceled, and the process moves to the next stage. How would you approach this design in Appian?

Answer

In Appian, you can do this with parallel User Input Tasks, an AND Gateway and a Terminate Process End Event.

The design depends on what should happen after the first approval: either the whole process ends, or it moves on to the next stage.


Scenario

Take a Loan Approval application where any one of three reviewers can approve a loan application.

The process creates three User Input Tasks at the same time:

  1. Approval Task 1 → Reviewer A
  2. Approval Task 2 → Reviewer B
  3. Approval Task 3 → Reviewer C

Business requirement:

If Reviewer B approves first:

  1. Reviewer B’s response is captured.
  2. The pending tasks for Reviewers A and C are canceled automatically.
  3. The application moves to the next stage without waiting for the other reviewers.


Approach 1: Use a Terminate End Event

If the whole process should end after the first approval, you can use a Terminate Process End Event.

Implementation:

  1. Add an AND Gateway to split the process into three parallel paths.
  2. Set up three User Input Tasks, each assigned to a different reviewer.
  3. Connect each User Input Task to an End Event with a Terminate Process trigger.
  4. When any reviewer completes their task, that path reaches the Terminate End Event.
  5. Appian stops the remaining active paths, which cancels the other pending approval tasks.

Example:

Say all three tasks are active:

  1. Reviewer A → Pending
  2. Reviewer B → Approved
  3. Reviewer C → Pending

When Reviewer B completes the task, that path reaches the Terminate End Event. Appian cancels the pending tasks for Reviewers A and C and ends the process instance.

Use this approach only when the whole process should end after the first approval. The same process instance can’t go on to another stage.

Consider a process with three parallel approval tasks assigned to three different users. You need to design the process so th



Approach 2: Use a synchronous subprocess (recommended)

If the process has to continue after the first approval, I would move the approval steps into their own subprocess.

Implementation:

  1. Create a subprocess called Loan Approval.
  2. Inside it, use an AND Gateway to create three parallel approval tasks.
  3. Assign each User Input Task to a different reviewer.
  4. Connect the approval tasks to a Terminate Process End Event.
  5. In the parent process, add a Subprocess node that calls Loan Approval.
  6. Set the subprocess to run synchronously, so the parent waits for it to finish.
  7. Capture the first reviewer’s response, and map the approval details back to the parent in the subprocess outputs.
  8. When the subprocess finishes, the parent process moves to the next stage.

How it works:

Say Reviewer B approves the loan first.

  1. Reviewer B’s approval is captured.
  2. The Terminate Process End Event fires inside the approval subprocess.
  3. The pending tasks for Reviewers A and C are canceled.
  4. The approval subprocess ends.
  5. The parent process picks up again and moves to the next stage, such as loan processing or disbursement.

This way only the approval subprocess is terminated, and the main business process keeps running.


Design considerations

Approval vs. task completion

If the process should move on only when someone selects Approve, and not every time a task is completed, capture the decision and use an XOR Gateway to route the next step.

For example, a rejection should follow its own business path. It shouldn’t be treated as an approval just because the task was completed.


Capture approval details

Before the approval subprocess terminates, make sure the reviewer’s decision and details are saved.

For example:

  1. Approved By: Reviewer B
  2. Decision: Approved
  3. Approval Date: current date and time


Concurrent submissions

Two reviewers might submit at almost the same moment. The process should stop that from causing duplicate approvals or running the downstream steps twice. Test this case, and add a single-decision control if you need one.


Activity chaining

Don’t chain activities into the Terminate End Event unless you need to. Check that the pending tasks are canceled correctly and that the parent receives the subprocess outputs it needs.


Conclusion

In an interview, I would explain both approaches:

  1. Terminate End Event: use it when the whole process should end as soon as one parallel task is completed.
  2. Synchronous subprocess with a Terminate End Event: use it when the remaining approval tasks need to be canceled but the parent process has to continue to the next stage.


Appian References

  1. End Event – Terminate Process Trigger
  2. Subprocess – Synchronous Execution
  3. Appian Community – Parallel Task Cancellation Scenario
JuniorSeniorProcess Models#secenrio_based