Answered

Use gateways or attach events to model our process

Hi all,

Recently me and a friend stumbled on a discussion how to model our process.

Previously we used gateways to model our process.

1942d6cad610b5bd4fef32cf92bf12d1

Example here: We used a exclusive gateway, saying if the user logged in 3 times wrongly in a short period, then if yes --> Lock him out. No --> Continue the flow.

Another way we went to model our process is by using events instead of gateways.

8483ffa35ed6d4470ef11b1f90b7208b

As seen here, I attached a signal event to the database checking the credentials. When the system would see that the user logged in 3 times wrongly in a short period, it would signal to lock out that user for x minutes.

We found that while the attach events made the process model a lot cleaner (a lot less gateways we had to use), it was less readable for people who don"t make process models.

What is the correct way to use these?

Comments (2)

photo
1

My two cents, being nitpicky:

Using exclusive gateway assumes the data that defines which path to follow is given by the process (e.g. a previous activity). This previous activity must be concluded in order to "send" the token to the gateway. So, assuming the activity prior to the gateway is "System checks credentials with database" (it's not clear in your example), this activity must be concluded to allow the gateway evaluate an expression. Question is, what "System checks credentials with database concluded" means in this case? Unless the activity itself can check the exception condition, seems to me there's a small logic issue in this option.

In the second case the attached event interrupts the activity if the 3x wrong log in happens, not being necessary to "conclude" it. Sounds more correct.

IMHO option 2 should be used here not because is cleaner, but is correct.

Regarding readability for non-users x correct use of notation: I prefer instructing users to correctly understand the notation, so with time this will become a non-issue. It's part of learning. Easier said than done, but the other way is assume doing things "incorrectly".

photo
1

My two cents, being nitpicky:

An exclusive gateway uses process data do define which path must be followed. Usually this process data is given by an activity prior to the gateway. The previous activity must be concluded in order to “send” the token to the gateway.

So, assuming in your first option the activity prior to the gateway is the same of second, “System checks credentials with database” must be concluded to reach the gateway. Question is, what is “System checks credentials with database concluded” means? If the activity itself can internally check the condition and give the “3 time login wrongly” output to the gateway, then ok using this option. Otherwise, option 2 seems to be more correct IMHO.

About correct use of notation vs readability for non-users.. I prefer explaining the notation to users, hoping that with time and use this become an non-issue. Easier said than done I know, but it’s part of learning.