Skip to main content
Solved

how to execute FME workbench with parameters in java

  • October 10, 2018
  • 2 replies
  • 79 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • 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
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2076 replies
  • October 13, 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

Nice Documentation @NatalieAtSafe