       .then (pages) =>
         @setState {pages}
 
+  getSelectedWorkflow: (project, preferences) ->
+    @setState selectedWorkflow: 'PENDING'
+
+    preferredWorkflowID = preferences?.preferences.selected_workflow ? project.configuration?.default_workflow
+    if preferredWorkflowID?
+      apiClient.type('workflows').get preferredWorkflowID
+        .then (workflow) =>
+          if workflow.active
+            @setState selectedWorkflow: workflow
+          else
+            @setState selectedWorkflow: null
+    else
+      @setState selectedWorkflow: null
+
   _lastSugarSubscribedID: null
 
   updateSugarSubscription: (project) ->

    background: null
    avatar: null
    pages: []

  componentDidMount: ->
    document.documentElement.classList.add 'on-project-page'
    @fetchInfo @props.project
    @updateSugarSubscription @props.project

  componentWillUnmount: ->

          <a href={@redirectClassifyLink(@props.project.redirect)} className="tabbed-content-tab" target="_blank">
            <Translate content="project.nav.classify" />
          </a>
        else if @state.selectedWorkflow is 'PENDING'
          <span className="classify tabbed-content-tab" title="Loading..." style={opacity: 0.5}>
            <Translate content="project.nav.classify" />
          </span>
        else
          if @state.selectedWorkflow?
            query = workflow: @state.selectedWorkflow.id
          <Link to="#{projectPath}/classify" query={query} activeClassName="active" className="classify tabbed-content-tab">
            <Translate content="project.nav.classify" />
          </Link>}

