Timer Event (after or before a Task)

Yes, that is what is modeled.
The timer starts when Task A is completed. If EITHER Task B or Task C (or both) is not complete when the 45 second timer expires, the not-completed task(s) will be cancelled and activity moves on to Task D.

Though, perhaps I misunderstood since you keep talking about parallel gateways.
If B must be completed before C, you could do:

I believe I expressed myself incorrectly. Based on what you modeled, I understood that in the subprocess, if a task is not solved within 45 seconds, everything in that subprocess stops. However, my intention was that if, for example, task B expires but the previous task was already processed, the process should still continue in the “and” branch.

I’m not clear how you’re using the word branch.

the <+> icon indicates “Do these tasks concurrently” not “Do both of these tasks”
B → C still indicates “Do both of these tasks” but indicates C will not start before B ends.

Tasks that are completed are not undone unless explicitly told to. So in the Subprocess with the Parallel gateways, B can be done before C, or C can be done before B, but with a Boundary Timer on the overall subprocess, anything not completed in 45 seconds will be told to stop.

It’s often hard to explain these sorts of things in an abstract way with A, B, C, D rather than real-life examples. The book “Real Life BPMN” actually helps a lot.

I think I’m expressing myself incorrectly. After the “and split,” we have tasks B and C. For example, I perform task C, but task B has expired, and in this “and split,” task B disappears, and the “and join” sees that there is no task B because it wasn’t completed within 45 seconds, and only task C was executed. Should I clarify this better, or show more precisely what I mean?

In the way I drew it, if Task C was completed before the 45 second timer went off, Task B would be cancelled, and the overall process would move on to Task D automatically.

I’m struggling to come up with a real-world scenario where you would be Ok not doing something that is part of the process if the time limit ran out. If it’s ok to skip it, why is it being done at all?

I keep coming back to the “Register for Course” example, which can be forced to mostly fit:
A = “Set up account”
B = “Complete registration form”
C = “Pay Fees”
D = “Attend Course”
But… If B is done and C is not, then you won’t be allowed to attend the course.

Ah, I understand your drawing now. What you’re saying makes sense, but my idea was different. I wanted to add a timer event at each task in the parallel gateway. I will create a more detailed model later so that it can be better understood. Essentially, I wanted to try to have one task executed within a specific time frame while the other one is not. However, I believe there might be a problem when merging the gateways.


As you can see here, I have modeled this process. First, you choose a movie. Then, I have a subprocess, but I’m not sure if it’s necessary. It goes like this: for example, in the cinema, you can buy drinks and popcorn within 45 seconds. If I don’t manage to do this, then we move to the last task where a cinema employee checks the ticket. So, within 45 seconds, you can buy cola and popcorn, only cola or only popcorn. If you don’t manage to do it in time, you can’t buy anything and go straight to the last task. I’m not sure if it’s allowed to do it this way. I hope it’s easier to understand.

Excellent! Now we’re working with a concrete example.

Yes, having interrupting timers connecting in to the parallel join will likely cause issues if you try to run it in a BPMN execution engine, but it’s a perfectly valid model for a process description diagram.

You have a redundant boundary timer. To solve this, you can either remove the boundary timers from both “Buy Popcorn” and “Buy Drinks” or from the sub-process. If you remove it from the subprocess, you can have different durations for “Buy Popcorn” and “Buy Drinks”, but from a reader perspective, that wouldn’t make much sense (Why are you allowed more time to “buy popcorn” than to “buy drinks”?)
If you remove the timer from “Buy Popcorn” and “Buy Drinks” and leave it on the sub-process, when “running” the process, if the task “Buy Popcorn” is completed within the 45 seconds, and you’re still in line to buy drinks, the timer would go off, you have the popcorn in your hands, you leave the drinks line, and you go sit down to watch your movie.

Is there an alternative way for me to execute it with the engine? My question is, how did you do it above, that you put the timer in the subprocess? Can I still perform the task “Buy Popcorn” but not the task “Buy Drinks,” and then proceed to the task “Check Ticket” at the end?

A = Buy Ticket
B = Buy Popcorn
C = Buy Drink
D = Watch Movie

If you buy your drink right away, but get stuck in line for popcorn, you will give up and go watch the movie.
If you buy your popcorn right away, but get stuck in line for drinks, you will give up and go watch the movie.
If you manage to buy both your popcorn and drink in under 45s, you’ll proceed directly to watching the movie.

I understand. So, if I make a “buy drinks” task but not a “popcorn” task, can the values I entered in the “buy drinks” task appear in a task like “check tickets”? However, I’m not sure if the values from the previous task can be seen once the timer runs out.

I think this is where we’re losing clarity in translation.
When I see “If I make” I understand you meaning “put a task in my diagram” not “Complete the task”

As far as I know, yes, variables that have been set on completing “Buy drink” (eg. Drink Type: Soda, Drink Brand: Pepsi ) should be available in “Watch movie”

By ‘if I make,’ I mean to execute the task.

This is a great use of Play Mode to validate both your assumptions and the model. I did a quick recreation of the model @GotnOGuts shared 3 replies above, then executed it in Play Mode. I used the Complete with Variables option on the User Tasks, and assigned a value in B. The value was still available when the subprocess exited.

1 Like

Thank you both very much. I’m sorry for asking so many questions.

1 Like