Getting assign event for next task before current task completes

#1

Hi,

I have implemented FlowableEventListener interface, which listens for FlowableEngineEventType.TASK_ASSIGNED event.
image

The flow goes as follows:

  1. Launch above process
  2. Complete Task1 (using TaskService.complete(String taskId) API)
  3. Receive TASK_ASSIGNED event for parallel assignees in Task2 and Task5

Problem: I start receiving TASK_ASSIGNED events for assignees of Task2 and Task5 before receiving the response of complete API call in 2nd step.

Instead I should start receiving the assign events for next task once the current task is all completed.

Is this as per design or this a bug that next tasks starts getting assigned before completing the current task?