apply piped tasked on a defined condition