factory workflow optimization