Hello, everyone.
I am a student and I am trying to understand how the tokens behave in this process model. My answers are incorrect and I keep trying to tackle them from different logic, but I am still learning and cannot fully grasp how the behaviour of tokens will be. Any assistance is really greatly appreciated! Thank you
Hello! Welcome to community my brother! \o
Letās go! Letās do one path at a time and arrive at the solution:
Exercise 1:
Upper path - Start:
Variable A = true⦠then start process A.
In the exclusive gateway, validation follows the path of variable C, since C = true and D = false.
In the parallel gateway, the single token that arrived there is divided into 3, one for each of the tasks, but we have the message that only 2 out of 3 passed, so in the complex gateway only 2 tokens arrive (Pos 1 = 2).
This complex gateway is convergent, that is, junction, so when the 2 tokens arrive there, they join in only 1, and then only 1 token arrives in Pos 2.
Variable B = true⦠the token follows the lower path, waits 11 seconds and proceeds to the exclusive gateway. But notice that subprocess A has a non-interruptible timer that creates one more token.
Knowing that another token was created by the timer, we have 2 tokens arriving at Pos 4 and as the next gateway is also exclusive, the tokens will not join, and it will first evaluate the variable āeā and if it does not satisfy the condition, it will evaluate the variable āfā, as the variable āeā satisfies the condition, this will make 2 tokens arrive at Pos 5.
Variable āaā and ābā are true, so it will start by both paths.
Upper path: Subprocess A.
The variable ācā is false and the variable ādā is true.
This will make the token go to the terminate event, ending all of subprocess A once and for all. When the token reaches the terminate event, all tokens of subprocess A disappear, as they end each and every task at once, even without having completed it. Therefore, no token will arrive at Pos 3. (Pos 3 = 0 token).
Bottom path:
As the variable ābā is true, the token will go to the timer and wait 11 seconds. The timer of subprocess A will not be activated because the subprocess was terminated with the Terminate Event. So we will only have one token in pos 4 and 1 token in pos 5.
Answer question 2 = [0] [1] [1].
I believe these are the answers.
If not, please let me know so I can take a closer look.
I read this slightly differently, so I come up with a slightly different answerā¦
I agree with the first two answers.
However, we donāt know how long āUpper Pathā is taking, so if it finishes in under 5s, the second token might not be created. Thus, I would answer [2][1][?]
Also, while itās not valid BPMN (both outgoing paths of the exclusive join are active), the intended outcome isnāt clear⦠Is the author hoping that a new token will be spawned on each loop? That would further indicate that Position 5 is ?
Agreed, however the token should then move on to Pos 3 since that is not within Subprocess A.
However, since we donāt know how long it takes to complete Task A.1, it is possible that the time in Subprocess A fires, so both Pos 4 and Pos 5 are indeterminate. [1][?][?]
I thought about this too when I saw it, but in my answer, I considered Task A.1 to be a Service task of simple complexity, which would perhaps take only 1 second to be completed, and therefore would not reach 3 seconds, since the validation of the exclusive gateway takes millisecondsā¦
Regarding the 2 ātrueā paths of the exclusive gateway, looking at Camundaās behavior, I believe that it will first evaluate the condition of the variable āeā and then the condition of the variable āfā, because in this case the variables would be evaluated by the āalphabetical sequenceā.
So the expected behavior would be:
The variable āeā will be the main evaluation, if in any condition it is == true, follow the happy path.
If the variable āeā is false and āfā is true, follow the path below.
If both variables come āfalseā⦠then weāre screwed! But I assume that the previous task in theory should not let both variables come as false
But in fact, your observation was of great importance.
Agreed, however the token should then move on to Pos 3 since that is not within Subprocess A.
You are right @GotnOGuts .
When a token reaches a terminate event it will terminate the other tokens of this subprocess and will reach the āend eventā, I disregarded this fact.
So correcting my answer number 2: [1] [1] [1].
But as our friend above said that he put [1] [1] [1] and it was wrong, then possibly it is [1] [2] [1], because they must be considering that task A.1 took more than 3 seconds.
Thatās why I said that the answer would be [1][?][?] because the instructions said it itās not clear how many, answer ? rather than a specific number.