@Override protected Edit<?> makeInsertNestedWorkflowEdit(Dataflow nestedFlow, String name) { Edits edits = EditsRegistry.getEdits(); Edit<?> configureActivityEdit = edits.getConfigureActivityEdit(getActivity(), nestedFlow); List<Edit<?>> editList = new ArrayList<Edit<?>>(); editList.add(configureActivityEdit); Processor p = findProcessor(fileManager.getCurrentDataflow(), getActivity()); if (p != null && p.getActivityList().size() == 1) { editList.add(edits.getMapProcessorPortsForActivityEdit(p)); } return new CompoundEdit(editList); }
public static void configureActivityStatic(Dataflow df, Activity a, Object bean) { Edits edits = EditsRegistry.getEdits(); Edit<?> configureActivityEdit = edits.getConfigureActivityEdit(a, bean); try { List<Edit<?>> editList = new ArrayList<Edit<?>>(); editList.add(configureActivityEdit); Processor p = findProcessor(df, a); if (p != null && p.getActivityList().size() == 1) { editList.add(edits.getMapProcessorPortsForActivityEdit(p)); } EditManager.getInstance().doDataflowEdit(df, new CompoundEdit(editList)); } catch (IllegalStateException e) { // TODO Auto-generated catch block logger.error(e); } catch (EditException e) { logger.error(e); } }
public void configureActivity(Dataflow df, Activity a, Object bean) { Edits edits = EditsRegistry.getEdits(); Edit<?> configureActivityEdit = edits.getConfigureActivityEdit(a, bean); try { List<Edit<?>> editList = new ArrayList<Edit<?>>(); editList.add(configureActivityEdit); Processor p = findProcessor(df, a); if (p != null && p.getActivityList().size() == 1) { editList.add(edits.getMapProcessorPortsForActivityEdit(p)); } Edit e = Tools.getEnableDisabledActivityEdit(super.owningProcessor, activity); if (e != null) { editList.add(e); EditManager.getInstance().doDataflowEdit(df, new CompoundEdit(editList)); ReportManager.getInstance().updateObjectReport(super.owningDataflow, super.owningProcessor); } } catch (IllegalStateException e) { // TODO Auto-generated catch block logger.error(e); } catch (EditException e) { logger.error(e); } }
protected void configureActivity(ConfigurationBean configurationBean) { Edits edits = EditsRegistry.getEdits(); Edit<?> configureActivityEdit = edits.getConfigureActivityEdit( getActivity(), configurationBean); Dataflow currentDataflow = FileManager.getInstance() .getCurrentDataflow(); try { List<Edit<?>> editList = new ArrayList<Edit<?>>(); editList.add(configureActivityEdit); Processor p = findProcessor(currentDataflow); if (p != null && p.getActivityList().size() == 1) { editList.add(edits.getMapProcessorPortsForActivityEdit(p)); } EditManager.getInstance().doDataflowEdit(currentDataflow, new CompoundEdit(editList)); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (EditException e) { e.printStackTrace(); } }
editList.add(edits.getConfigureActivityEdit(dataflowActivity, dataflowCopy)); for (Processor dataflowProcessor : dataflowProcessors) { editList.add(edits.getMapProcessorPortsForActivityEdit(dataflowProcessor));
editList.add(edits.getConfigureActivityEdit(dataflowActivity, dataflowCopy)); for (Processor dataflowProcessor : dataflowProcessors) { editList.add(edits.getMapProcessorPortsForActivityEdit(dataflowProcessor));
/** * Adds the selected dataflow to the currently opened one. Create a * processor with the same name as the nested dataflow (ie. the one just * opened). Add the configured dataflow activity to this processor. Then use * the {@link EditManager} to add the processor to the main dataflow so that * any GUI updates are forced * * @param dataflow */ private void addSelectedDataflowToCurrentDataflow(Dataflow dataflow) { createProcessor = EditsRegistry.getEdits().createProcessor( dataflow.getLocalName()); try { EditsRegistry.getEdits().getAddActivityEdit(createProcessor, dataflowActivity).doEdit(); EditManager.getInstance().doDataflowEdit( (Dataflow) ModelMap.getInstance().getModel( ModelMapConstants.CURRENT_DATAFLOW), EditsRegistry.getEdits() .getMapProcessorPortsForActivityEdit( createProcessor)); } catch (EditException e) { logger.error("Could not add nested workflow", e); } }
/** * Adds the selected dataflow to the currently opened one. Create a * processor with the same name as the nested dataflow (ie. the one just * opened). Add the configured dataflow activity to this processor. Then use * the {@link EditManager} to add the processor to the main dataflow so that * any GUI updates are forced * * @param dataflow */ private void addSelectedDataflowToCurrentDataflow(Dataflow dataflow) { createProcessor = EditsRegistry.getEdits().createProcessor( dataflow.getLocalName()); try { EditsRegistry.getEdits().getAddActivityEdit(createProcessor, dataflowActivity).doEdit(); EditManager.getInstance().doDataflowEdit( (Dataflow) ModelMap.getInstance().getModel( ModelMapConstants.CURRENT_DATAFLOW), EditsRegistry.getEdits() .getMapProcessorPortsForActivityEdit( createProcessor)); } catch (EditException e) { // TODO Auto-generated catch block e.printStackTrace(); } }