Skip to main content
April 14, 2026
Solved

Terminate process model after n- minutes

  • April 14, 2026
  • 8 replies
  • 0 views

Hi Team,

We have a scenario where Process Model 1 calls Sub‑Process Model 2 in synchronous mode. Sub‑Process Model 2 contains Process 2.1 and Process 2.2.
Normally, these complete within expected time, but if Process Model 2 runs longer than 15 minutes, we want to:
- Terminate Sub‑Process Model 2.
- Mark it as completed so it doesn’t remain in an in‑progress state.


Essentially:
- Process Model 1 (synchronous) → Process Model 2.1 & 2.2.
- If execution exceeds 15 minutes, enforce a timeout, terminate, and mark complete.


Question to the Community:
- What is the recommended way to implement this timeout/termination logic in Appian?
- Is there a best practice for handling long‑running synchronous sub‑processes (e.g., timers, escalation paths, or design patterns)?

Error "The amount of time allocated for the completion of an unattended activity was insufficient to allow the activity to complete."

    Best answer by mikes0011

    In the "handler" subprocess ("Model 2" in your example from what I can tell), one of the easiest ways to do this will be to use an AND gateway to create a parallel secondary flow that rests on a timeout timer, and if that timer expires prior to the two (2.1 and 2.2) subprocesses completing normally, set an error condition and terminate, in which case the parent process can observe the value of the passed-back error variable (can just be text containing your error message, etc) and take action based on that.

    e.g.

    8 replies

    mikes0011
    mikes0011Answer
    Brainy
    April 14, 2026

    In the "handler" subprocess ("Model 2" in your example from what I can tell), one of the easiest ways to do this will be to use an AND gateway to create a parallel secondary flow that rests on a timeout timer, and if that timer expires prior to the two (2.1 and 2.2) subprocesses completing normally, set an error condition and terminate, in which case the parent process can observe the value of the passed-back error variable (can just be text containing your error message, etc) and take action based on that.

    e.g.

    April 14, 2026

    Should this be handled with an “OR” condition in the process flow?

    For example, if the sub‑process runs longer than 15 minutes and gets stuck, while the first flow is still waiting to complete, how should we design the logic so that the system doesn’t remain blocked?

    mikes0011
    Brainy
    April 14, 2026
    Should this be handled with an “OR” condition

    no.  the AND gateway is intentional here.

    how should we design the logic so that the system doesn’t remain blocked?

    That's what the above diagram does.  When the timer expires (whether or not the subprocesses are complete), the "subprocess 2" completes with a Terminate node and the parent ("Process Model 1") proceeds.

    shubhama926776
    April 15, 2026

    Use a timer-based timeout path or, preferably, redesign the child as an asynchronous process; avoid keeping the parent waiting synchronously beyond 15 minutes.

    April 15, 2026

    [mention:9861aef97eb2483a8b76175d9eda1e37:e9ed411860ed4f2ba0265705b8793d05] Could you elaborate on timer-based timeout path?

    shubhama926776
    April 15, 2026

    Add a Timer node for 15 minutes in the child process, then use a gateway so either the work finishes or the timer fires. If the timer wins, terminate the child and return a timeout status to the parent.