refactoring of workflow configuration code