Before automation is started