While making the task as async than facing OptimisticLockingException with parallel tasks.
If we have a task as sync than the system is taking longer time to complete the task because the system is trying to complete all remaining tasks in the user task.
It is having a performance issue in UI.
Waiting for input
There isn’t really a question here. Optimistic locking happens when two or more tasks try to modify the same processes at the same time. I see it most frequently when very short service tasks occur in parallel. The solution is to change the timing of the tasks in some way, either by placing them in series or varying start/end times.