Skip to main content
April 7, 2025
Question

Appian Task

  • April 7, 2025
  • 8 replies
  • 0 views

Hi Everyone,

I am handling the task assignment through database tables. But when two users will click simultaneouly on the link which will start the process model. How to ensure that only one user should be given the task.

    8 replies

    varuntejg243705
    April 7, 2025

    Hi [mention:bb176b67c26c4e89b2173f39160c9f46:e9ed411860ed4f2ba0265705b8793d05] ,

    I have a solution for this, please follow below steps :

    • User clicks the link

    • Start a process model

    • Checks if the task is already assigned :

      • If Yes → show user “Task already assigned” or end process.

      • If No -> Change the assigned_to to the process initiator .  
      • Check if the assignment succeeded.

      • Move forward and assign the task.

    Note : 

    • Make sure the assigned_to column is NULL by default.

    • Consider placing a unique constraint on task_id + assigned_to if you want stricter DB rules.

    Hope this helps you!!!

    April 7, 2025

    Hi [mention:3f9551bc38d94a79ae62f9d520dbad6d:e9ed411860ed4f2ba0265705b8793d05] ,

    thank you for your response, but if two users click on task at the same time so they will be presented the same user input form. How to avoid this?

    mikes0011
    Brainy
    April 7, 2025

    If you build the process right, there's no way this can happen.  I built one of these myself once and I tested with another person where we both sat and tried to click at exactly the same time, but still one of us got into the task and the other one was locked out due to the process locking.  The process flow executes so quickly that milliseconds of difference is enough.

    stefanhelzle0001
    April 7, 2025

    Do you have a specific reason to go that way? I mean, Appian processes support the idea of "Tasks" directly.

    April 8, 2025

    Hi [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] ,

    can you please direct me to some tutorial to implement process task?