Updated version of advancedworkflow