I’ve read the docs here but they don’t fully explain what would happen if I set asyncAfter on one service task and asyncBefore on the next service task.
eg. --- ServiceTaskA -- (asyncAfter) -- (asyncBefore) -- ServiceTaskB ---
Are the two async instructions effectively merged into one? ie. is there a cost overhead in setting both flags as compared to just setting one?
Lets understand when you configured any service task with asyncBefore in that case your user task or any event which is configured before this service task will get complete and that user task or event is not waiting for your service task execution if your service task is getting failed but still your task will get completed
Now come on asyncAfter when you configured any service task with asyncAfter so it will tightly coupled with your user task or any event which you put before service task in that case if your service task is not get execute successfully than user task is also not get completed
now come to the your question what happen if you configure one with asyncAfter and than asyncBefore on next service task in that case your first service task is waiting for successful execution than second service task will get execute in background.
What happens with both asyncAfter and asycBefore => Behaviour is same like asyncBefore.
Then you’d have two transaction points: one immediately after the first service, and the other immediately before the second service. In between lies the connection between the two tasks.