Skip to main content
Solved

how to execute FME workbench with parameters in java


I am trying to run FME workbench with input and output file destination and directory. This workbench is copying file from one directory and pasting in another directory.

I tried with different methods of IFMEStringArray but doesn't seem to work and I can't find documentation on the internet.

 

IFMESession createSession = COM.safe.fmeobjects.FMEObjects.createSession(); IFMEWorkspaceRunner createWorkspaceRunner = createSession.createWorkspaceRunner(); IFMEStringArray createStringArray = createSession.createStringArray(); createStringArray.append("C:\\\\test\\\\test.csv"); createStringArray.append("C:\\\\test2"); createWorkspaceRunner.runWithParameters("C:\\\\test\\\\Initialization_VIC_DataSet.fmw", createStringArray);

Above is my code. Can someone please help?

Best answer by fmelizard

Hi @gaurav14u.

There's a sample Java app that demonstrates use of IFMEWorkspaceRunner in FME_HOME\\fmeobjects\\samples\\Java\\GeometryViewer so that might give you the jump start you need.

There's also a Python IFMEWorkspaceRunner sample if you prefer that route: FME_HOME\\fmeobjects\\samples\\Python\\WorkspaceRunner

View original
Did this help you find an answer to your question?

2 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • Best Answer
  • October 11, 2018

Hi @gaurav14u.

There's a sample Java app that demonstrates use of IFMEWorkspaceRunner in FME_HOME\\fmeobjects\\samples\\Java\\GeometryViewer so that might give you the jump start you need.

There's also a Python IFMEWorkspaceRunner sample if you prefer that route: FME_HOME\\fmeobjects\\samples\\Python\\WorkspaceRunner


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • October 13, 2018
fmelizard wrote:

Hi @gaurav14u.

There's a sample Java app that demonstrates use of IFMEWorkspaceRunner in FME_HOME\\fmeobjects\\samples\\Java\\GeometryViewer so that might give you the jump start you need.

There's also a Python IFMEWorkspaceRunner sample if you prefer that route: FME_HOME\\fmeobjects\\samples\\Python\\WorkspaceRunner

Nice Documentation @NatalieAtSafe

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings