Duplicate instance of related action.

Hi All,

We were checking a scenario in which  if I open any related action from a record and again copy the URL of the related action and  launch it in the another Tab of the same browser , it create 2 different instances of the same process model .

Can we have some a way to stop create a duplicate instance of PM  as both are launch in the same browser ?

 

Cheers

 

Manish

 

 

  Discussion posts and replies are publicly visible

Parents
  • Hello Manish,

    As mentioned above it is not exactly the same process but it can certainly be the same record which initiated the processes.
    Having a flag or lock and a check at the very beginning of the process can help you to make sure you just have one instance.

    For example:
    Having two users with the record open (without refreshing) it is very likely to happen very often so your question is quite good, but if you write something to the DB when someone clicks on the related action (after submitting the start form) then when the second person clicks on it you check for the flag and kill the process.

    This can still be a problem if two users can click at exactly the same time the same record, which the probabilities are reduced a very very much compared with the previous scenario.

    If your process needs to ensure that the record is just affected once and you don’t have related actions (even if you do there are tricks) you can add the JPA annotation @Version that prevent that 2 persons affect the same record at the same time.

    Jose
Reply
  • Hello Manish,

    As mentioned above it is not exactly the same process but it can certainly be the same record which initiated the processes.
    Having a flag or lock and a check at the very beginning of the process can help you to make sure you just have one instance.

    For example:
    Having two users with the record open (without refreshing) it is very likely to happen very often so your question is quite good, but if you write something to the DB when someone clicks on the related action (after submitting the start form) then when the second person clicks on it you check for the flag and kill the process.

    This can still be a problem if two users can click at exactly the same time the same record, which the probabilities are reduced a very very much compared with the previous scenario.

    If your process needs to ensure that the record is just affected once and you don’t have related actions (even if you do there are tricks) you can add the JPA annotation @Version that prevent that 2 persons affect the same record at the same time.

    Jose
Children
No Data