get the workflow state var from workflow configuration

instead of guessing its name