Can you to give more information about your workflow? You say:
when I finish the task number three then the task number two must finish too
Let's answer some questions about expected result:
Should workflow end after task3 and task2 have been completed both?
Your сurrent bpmn model means that:
task1 and task2 will be create in the same time;
workflow has been completed if:
task3 and after that task 4 will be completed;
OR task 2 will be completed.
BPMN notation allows one and more end events, but when you reach any end event your workflow will be completed. One parallel gateway before tasks means that they will be create in same time, not complete.
If it necessary to complete task 2 and task 3 both before workflow completes, you must add one more parallel gateway.
If it necessary to complete task 2 when the task 3 completes you may use inclusive gateway which:
sources will be task 3 and task 2 both;
target: task 4 or end end.
Anyway, I can`t clearly understand conditions create\complete of 4th task: does it mandatory?
Also, if task 2 and task 3 have same model types you can:
make one task instead of 2 and 3;
use multi instance with a condition nrOfCompletedInstances > 0. You can read more about it in the Activiti userguide
But last method be useful, if when the task 2 will be completed earlier than task 3, task 3 must be completed too.
I hope, i have give you some ideas how to solve your problem!
If you have questions I will be glad to answer it. When the requirements are clear it is very easy to build right model
If the workflow reach an end event (not terminate end event) , the workflow will not be completed if there is an active task , in this case , completing task 2 will not end the workflow and the model is correct, that's BPMN conform.