Prevent double validation by the same person

Hello,
I have 2 groups of validations (G1 and G2).
One person belongs to both groups and I would like when validating the first action (in G1) that it can not validate the second action (in G2).
How to do ?

Hello Bertrand,

You can do a check on your G1 action with an SQL query in the code behind. You can check if the G1 user is in the G2 group.

You can check the result in a hidden field and used this as a condition in your workflow.

SQL query example:

  SELECT * FROM USERS
  INNER JOIN WFPARTICIPANT_MAPTO ON WFPARTICIPANT_MAPTO.ID_USER = USERS.ID_USER
  INNER JOIN WFPARTICIPANT ON WFPARTICIPANT.ID_PARTICIPANT = WFPARTICIPANT_MAPTO.ID_PARTICIPANT
  INNER JOIN WFPROCESS ON WFPROCESS.ID_PROCESS = WFPARTICIPANT.ID_PROCESS
  WHERE USERS.USERNAME = 'USERNAME' 
  AND WFPROCESS.NAME = 'PROCESS_NAME'
  AND WFPARTICIPANT.NAME = 'PARTICIPANT_NAME'