Search in sources :

Example 1 with MyTasksView

use of com.centurylink.mdw.plugin.designer.views.MyTasksView in project mdw-designer by CenturyLinkCloud.

the class WorkflowElementActionHandler method showInstances.

public void showInstances(WorkflowElement element) {
    if (element instanceof WorkflowProject) {
        // TODO myTasks is hardcoded
        WorkflowProject project = (WorkflowProject) element;
        try {
            IViewPart viewPart = getPage().showView("mdw.views.designer.list.myTasks");
            if (viewPart != null) {
                MyTasksView myTasksView = (MyTasksView) viewPart;
                myTasksView.setProject(project);
                myTasksView.refreshTable();
            }
        } catch (PartInitException ex) {
            PluginMessages.log(ex);
        }
    } else if (element instanceof WorkflowProcess) {
        try {
            IViewPart viewPart = getPage().showView("mdw.views.designer.process.instance.list");
            if (viewPart != null) {
                ProcessInstanceListView instancesView = (ProcessInstanceListView) viewPart;
                instancesView.setProcess((WorkflowProcess) element);
            }
        } catch (PartInitException ex) {
            PluginMessages.log(ex);
        }
    }
}
Also used : MyTasksView(com.centurylink.mdw.plugin.designer.views.MyTasksView) IViewPart(org.eclipse.ui.IViewPart) ProcessInstanceListView(com.centurylink.mdw.plugin.designer.views.ProcessInstanceListView) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject) PartInitException(org.eclipse.ui.PartInitException) WorkflowProcess(com.centurylink.mdw.plugin.designer.model.WorkflowProcess)

Aggregations

WorkflowProcess (com.centurylink.mdw.plugin.designer.model.WorkflowProcess)1 MyTasksView (com.centurylink.mdw.plugin.designer.views.MyTasksView)1 ProcessInstanceListView (com.centurylink.mdw.plugin.designer.views.ProcessInstanceListView)1 WorkflowProject (com.centurylink.mdw.plugin.project.model.WorkflowProject)1 IViewPart (org.eclipse.ui.IViewPart)1 PartInitException (org.eclipse.ui.PartInitException)1