setting prep ids per task in task chain

fixes #5402