I am working on a related action and while working on a related action I don't want anyone to work on that related action

Certified Senior Developer

I am working on a related action and while working on a related action I don't want anyone to work on that related action so how to implement this scenario?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I'm implemented this before using a low-complexity DB table and a pessimistic locking system - any time the related action is kicked off, the table can be queried and returns a row with the result of the status of the process; if another user is marked as having an active instance, the current user is routed to a different task that simply tells them it's in use.  Otherwise they're instantly routed to the normal task, while at the same time a DB row is written indicating that they have an instance open.  When they complete or cancel, that row is updated indicating that their instance is no longer open.  One advantage here is you can scale this up to handle different process models just by making one of the columns in the table based on the PM ID.

Reply
  • 0
    Certified Lead Developer

    I'm implemented this before using a low-complexity DB table and a pessimistic locking system - any time the related action is kicked off, the table can be queried and returns a row with the result of the status of the process; if another user is marked as having an active instance, the current user is routed to a different task that simply tells them it's in use.  Otherwise they're instantly routed to the normal task, while at the same time a DB row is written indicating that they have an instance open.  When they complete or cancel, that row is updated indicating that their instance is no longer open.  One advantage here is you can scale this up to handle different process models just by making one of the columns in the table based on the PM ID.

Children
No Data