How can i custom workflow with IFMEFactoryPipeline?

View: New views
1 Messages — Rating Filter:   Alert me  

How can i custom workflow with IFMEFactoryPipeline?

by ming.chang () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


here is my codeCustomWorkflow.java,i want custom workflow with IFMEFactoryPipeline, but it doen't recognize my factory?:
                        IFMEStringArray fmeWriterParams = session.createStringArray();
                        IFMELogFile log = session.logFile();
                        log.setFileName("factory.log", false);
                        log.logMessageString("Initialization complete.", IFMELogFile.FME_INFORM);

                        fmeWriter.open("output", fmeWriterParams);
                        IFMEFeature fmeFeature = session.createFeature();
                        // pipeline.addFactories("deffac.txt");

                        // write schema
                        while (fmeReader.readSchema(fmeFeature)) {
                                pipeline.processFeature(fmeFeature);
                        }
                        pipeline.allDone();
                        while (pipeline.getOutputFeature(fmeFeature)) {
                                fmeWriter.addSchema(fmeFeature);
                        }
                       
                        // write data
                        while (fmeReader.read(fmeFeature)) {
                                pipeline.processFeature(fmeFeature);
                        }
                        pipeline.allDone();
                        while (pipeline.getOutputFeature(fmeFeature)) {
                                fmeWriter.write(fmeFeature);
                        }