How can we implement locking in appian? How many types of locking are supported?

How can we implement locking in appian? How many types of locking are supported?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The super short answer is that there's no "Lock Process" function or "Lock DB Row" smart service in Appian that's pre-built for you.

    Your best bet is to roll your own locking mechanism, which has the distinct advantage of being whatever you want:

    Think of what records you'd want to be locked.

    Think of what users could be doing to those records that would require them to be locked for that operation.

    Think of how you would determine when that operation began and ended (When does it get locked?  When does it get unlocked?) 

    Who or what would you tell that this record has been locked?  How would you store the locked / not locked info?  Would you include timestamp and ID of the user who locked it? (You probably should)

    Think of what users could and could not do to a record while it's locked by someone else.

    Think of how the process would discover whether it's locked or not before they try doing something prohibited by the lock.

    Think of what the system should display to the user when they can't do something because the record is locked. (Who locked it, when, and why it's locked?)

    Think about what circumstances you would allow the user to break a lock.  How would they do that?

    Think about what to do when a record stays locked by an abandoned process.  Does it eventually unlock?  Does it still require someone to break the lock?

    Lastly, think about what to do when the whole thing breaks, because yeah it's a lot.  Lets just face that something this complex will almost necessarily have bugs.  How do you handle incidents involving the locking mechanism?  Do you give admins a tool to circumvent broken locking?

Reply
  • 0
    Certified Lead Developer

    The super short answer is that there's no "Lock Process" function or "Lock DB Row" smart service in Appian that's pre-built for you.

    Your best bet is to roll your own locking mechanism, which has the distinct advantage of being whatever you want:

    Think of what records you'd want to be locked.

    Think of what users could be doing to those records that would require them to be locked for that operation.

    Think of how you would determine when that operation began and ended (When does it get locked?  When does it get unlocked?) 

    Who or what would you tell that this record has been locked?  How would you store the locked / not locked info?  Would you include timestamp and ID of the user who locked it? (You probably should)

    Think of what users could and could not do to a record while it's locked by someone else.

    Think of how the process would discover whether it's locked or not before they try doing something prohibited by the lock.

    Think of what the system should display to the user when they can't do something because the record is locked. (Who locked it, when, and why it's locked?)

    Think about what circumstances you would allow the user to break a lock.  How would they do that?

    Think about what to do when a record stays locked by an abandoned process.  Does it eventually unlock?  Does it still require someone to break the lock?

    Lastly, think about what to do when the whole thing breaks, because yeah it's a lot.  Lets just face that something this complex will almost necessarily have bugs.  How do you handle incidents involving the locking mechanism?  Do you give admins a tool to circumvent broken locking?

Children
No Data