class MCWorkflowToolbarComponentController {
    /*@ngInject*/
    constructor(workflowService, workflowFiltersService, $timeout, $mdDialog, $stateParams, mcstate, mcbus,
                mcshow, mcprojstore) {
        this.myName = "mcWorkflowToolbar";
        this.workflowService = workflowService;
        this.workflowFiltersService = workflowFiltersService;
        this.$timeout = $timeout;
        this.selectedProcess = null;
        this.$mdDialog = $mdDialog;
        this.mcstate = mcstate;
        this.projectId = $stateParams.project_id;
        this.experimentId = $stateParams.experiment_id;
        this.mcbus = mcbus;
        this.mcshow = mcshow;
        this.mcprojstore = mcprojstore;
        this.query = '';
        this.showingWorkflowGraph = true;
        this.isMaximized = false;
        this.tooltipsEnabled = true;
    }


    $onInit() {
        this.unsubscribe = this.mcprojstore.subscribe(this.mcprojstore.OTPROCESS, this.mcprojstore.EVSET, (process) => {
            this.selectedProcess = process;
        });
        //let cb = (selected) => this.$timeout(() => this.selectedProcess = selected);
        //this.mcstate.subscribe(this.mcstate.SELECTED$PROCESS, this.myName, cb);
        this.mcstate.set('WORKSPACE$MAXIMIZED', this.isMaximized);
    }

    $onDestroy() {
        this.unsubscribe();
        //this.mcstate.leave(this.mcstate.SELECTED$PROCESS, this.myName);
    }

    startIntro() {
        console.log('element', document.getElementById("wf-step-1"));
        introJs().addSteps([
            {
                element: document.getElementById("wf-step-1"),
                intro: "The build tab is where you will choose process templates to build out your workflow.",
            },
            {
                element: document.getElementById("wf-step-2"),
                intro: "The details tab allows you to add and view information about a process node. You can also add samples if your node is a create samples node."
            },
            {
                element: document.getElementById("wf-step-3"),
                intro: "You can apply filters to your graph to temporarily remove nodes.",
            },
            {
                element: document.getElementById("processesGraph"),
                intro: "Your workflow graph will appear here. You can right-click on nodes in the graph to bring up a menu of actions."
            },
        ]).start();
        //introJs().start();
    }

    addProcess() {
        this.$mdDialog.show({
            templateUrl: 'app/project/experiments/experiment/components/workflow/mc-process-templates-dialog.html',
            controller: SelectProcessTemplateDialogController,
            controllerAs: '$ctrl',
            bindToController: true,
            multiple: true
        });
    }

    cloneProcess() {
        this.workflowService.cloneProcess(this.projectId, this.experimentId, this.selectedProcess);
    }

    deleteProcess() {
        this.workflowService.deleteNodeAndProcess(this.projectId, this.experimentId, this.selectedProcess.id);
        this.selectedProcess = null;
    }

    showSelectedProcess() {
        this.mcshow.processDetailsDialog(this.selectedProcess, false);
    }

    search() {
        this.mcstate.set('WORKFLOW$SEARCH', this.query);
    }

    reset() {
        this.query = '';
        this.mcbus.send('WORKFLOW$RESET');
    }

    restoreHiddenProcesses() {
        this.mcbus.send('WORKFLOW$RESTOREHIDDEN');
    }

    toggleNavigator() {
        this.mcbus.send('WORKFLOW$NAVIGATOR');
    }

    toggleTooltips() {
        this.tooltipsEnabled = !this.tooltipsEnabled;
        this.mcstate.set('WORKFLOW$TOOLTIPS', this.tooltipsEnabled);
    }

    showWorkflowGraph() {
        this.showingWorkflowGraph = true;
        this.mcbus.send('WORKFLOW$VIEW', 'graph');
    }

    showWorkflowOutline() {
        this.showingWorkflowGraph = false;
        this.mcbus.send('WORKFLOW$VIEW', 'outline');
    }

    filterBySamples() {
        this.workflowFiltersService.filterBySamples(this.projectId, this.experimentId);
    }

    toggleSidebar() {
        this.isMaximized = !this.isMaximized;
        this.mcstate.set('WORKSPACE$MAXIMIZED', this.isMaximized);
    }
}

class SelectProcessTemplateDialogController {
    /*@ngInject*/
    constructor($stateParams, $mdDialog, workflowService) {
        this.$mdDialog = $mdDialog;
        this.projectId = $stateParams.project_id;
        this.experimentId = $stateParams.experiment_id;
        this.workflowService = workflowService;
        this.keepOpen = false;
    }

    addSelectedProcessTemplate(templateId) {
        this.workflowService.addProcessFromTemplate(templateId, this.projectId, this.experimentId, this.keepOpen)
    }

    done() {
        this.$mdDialog.hide();
    }

}

angular.module('materialscommons').component('mcWorkflowToolbar', {
    templateUrl: 'app/project/experiments/experiment/components/workflow/mc-workflow-toolbar.html',
    controller: MCWorkflowToolbarComponentController
});

@@ -2428,37 +2428,8 @@
 ();%0A
-        //introJs().start();%0A
     

Remove commented out code