Shell shell = activeWorkbenchWindow.getShell();
shell.setActive();
Map<Class< ? extends State>, WorkflowWizardPageProvider> pageMapping=new HashMap<Class<? extends State>, WorkflowWizardPageProvider>();
ResourceSelectionPage resourceSelectionPage = new ResourceSelectionPage(Messages.AddToNewMap_resource_selection_page_title);
resourceSelectionPage.setCollapseCheckedInput(true);
pageMapping.put(ResourceSelectionState.class, new BasicWorkflowWizardPageFactory(resourceSelectionPage));
ResourceSelectionState resourceSelectionState = new ResourceSelectionState();
resourceSelectionState.setServices(services);
Workflow workflow=new Workflow(new State[]{resourceSelectionState});
workflow.setContext(resources);
WorkflowWizard wizard = new WorkflowWizard(workflow, pageMapping);