plugins/misc/reflection/src/main/java/org/apache/hop/reflection/workflow/meta/WorkflowLogEditor.java
private void createPipelineFile(Composite parent) {
    try {
      PipelineMeta pipelineMeta = new PipelineMeta();

      // Add a Pipeline Logging transform...
      //
      WorkflowLoggingMeta workflowLoggingMeta = new WorkflowLoggingMeta();
      workflowLoggingMeta.setLoggingActionResults( true );
      TransformMeta workflowLogging = new TransformMeta("Workflow Logging", workflowLoggingMeta);
      workflowLogging.setLocation( 200, 150 );
      pipelineMeta.addTransform( workflowLogging );

      // Add a dummy
      //
      DummyMeta dummyMeta = new DummyMeta();
      TransformMeta dummy = new TransformMeta("Save logging here", dummyMeta);
      dummy.setLocation( 500, 150 );
      pipelineMeta.addTransform( dummy );

      // Add a hop between both transforms...
      //
      pipelineMeta.addPipelineHop( new PipelineHopMeta(workflowLogging, dummy) );

      // Save it...
      //
      HopPipelineFileType<PipelineMeta> type = new HopPipelineFileType<>();
      String filename =
          BaseDialog.presentFileDialog(
              true, // save
              parent.getShell(),
              wFilename,
            manager.getVariables(),
              type.getFilterExtensions(),
              type.getFilterNames(),
              true);
      if (filename != null) {
        // User specified a pipeline filename
        //
        String realFilename = manager.getVariables().resolve( filename );
        pipelineMeta.setFilename(realFilename);
        pipelineMeta.clearChanged();

        HopDataOrchestrationPerspective perspective = HopGui.getDataOrchestrationPerspective();

        // Switch to the perspective
        //
        perspective.activate();

        // Open it in the Hop GUI
        //
        HopGui.getDataOrchestrationPerspective().addPipeline(hopGui, pipelineMeta, type);

        // Save the file
        hopGui.fileDelegate.fileSave();
      }
    } catch (Exception e) {
      new ErrorDialog(parent.getShell(), "Error", "Error creating pipeline", e);
    }
  }
/**
   * Create a new pipeline file: ask the user for a name. Add a standard transform and a dummy to
   * show how it works.
   *
   * @param parent
   */
Create a new pipeline file: ask the user for a name. Add a standard transform and a dummy to
show how it works.

@param parent
Create a new pipeline file : ask the user for a name . Add a standard transform and a dummy to show how it works . @param parent
private void createPipelineFile(Composite parent) {
    try {
      PipelineMeta pipelineMeta = new PipelineMeta();
      WorkflowLoggingMeta workflowLoggingMeta = new WorkflowLoggingMeta();
      workflowLoggingMeta.setLoggingActionResults( true );
      TransformMeta workflowLogging = new TransformMeta("Workflow Logging", workflowLoggingMeta);
      workflowLogging.setLocation( 200, 150 );
      pipelineMeta.addTransform( workflowLogging );
       Add a dummy
      DummyMeta dummyMeta = new DummyMeta();
      TransformMeta dummy = new TransformMeta("Save logging here", dummyMeta);
      dummy.setLocation( 500, 150 );
      pipelineMeta.addTransform( dummy );
       Add a hop between both transforms...
      pipelineMeta.addPipelineHop( new PipelineHopMeta(workflowLogging, dummy) );
       Save it...
      HopPipelineFileType<PipelineMeta> type = new HopPipelineFileType<>();
      String filename =
          BaseDialog.presentFileDialog(
              true,  save
              parent.getShell(),
              wFilename,
            manager.getVariables(),
              type.getFilterExtensions(),
              type.getFilterNames(),
              true);
      if (filename != null) {
         User specified a pipeline filename
        String realFilename = manager.getVariables().resolve( filename );
        pipelineMeta.setFilename(realFilename);
        pipelineMeta.clearChanged();
        HopDataOrchestrationPerspective perspective = HopGui.getDataOrchestrationPerspective();
         Switch to the perspective
        perspective.activate();
         Open it in the Hop GUI
        HopGui.getDataOrchestrationPerspective().addPipeline(hopGui, pipelineMeta, type);
         Save the file
        hopGui.fileDelegate.fileSave();
      }
    } catch (Exception e) {
      new ErrorDialog(parent.getShell(), "Error", "Error creating pipeline", e);
    }
  }
private void createPipelineFile ( Composite parent ) { try { PipelineMeta pipelineMeta = new PipelineMeta ( ) ; WorkflowLoggingMeta workflowLoggingMeta = new WorkflowLoggingMeta ( ) ; workflowLoggingMeta . setLoggingActionResults ( true ) ; TransformMeta workflowLogging = new TransformMeta ( "Workflow Logging" , workflowLoggingMeta ) ; workflowLogging . setLocation ( 200 , 150 ) ; pipelineMeta . addTransform ( workflowLogging ) ; DummyMeta dummyMeta = new DummyMeta ( ) ; TransformMeta dummy = new TransformMeta ( "Save logging here" , dummyMeta ) ; dummy . setLocation ( 500 , 150 ) ; pipelineMeta . addTransform ( dummy ) ; pipelineMeta . addPipelineHop ( new PipelineHopMeta ( workflowLogging , dummy ) ) ; HopPipelineFileType < PipelineMeta > type = new HopPipelineFileType < > ( ) ; String filename = BaseDialog . presentFileDialog ( true , parent . getShell ( ) , wFilename , manager . getVariables ( ) , type . getFilterExtensions ( ) , type . getFilterNames ( ) , true ) ; if ( filename != null ) { String realFilename = manager . getVariables ( ) . resolve ( filename ) ; pipelineMeta . setFilename ( realFilename ) ; pipelineMeta . clearChanged ( ) ; HopDataOrchestrationPerspective perspective = HopGui . getDataOrchestrationPerspective ( ) ; perspective . activate ( ) ; HopGui . getDataOrchestrationPerspective ( ) . addPipeline ( hopGui , pipelineMeta , type ) ; hopGui . fileDelegate . fileSave ( ) ; } } catch ( Exception e ) { new ErrorDialog ( parent . getShell ( ) , "Error" , "Error creating pipeline" , e ) ; } }
Create a new pipeline file: ask the user for a name.
Create a new pipeline file : ask the user for a name .
// Add a Pipeline Logging transform... // // Add a dummy // // Add a hop between both transforms... // // Save it... // // save // User specified a pipeline filename // // Switch to the perspective // // Open it in the Hop GUI // // Save the file