Skip to main content
Solved

how to execute FME workbench with parameters in java

  • Oct 10, 2018 1:20 PM UTC
  • 2 replies
  • 170 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

View original
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+22
  • Safer
  • Best Answer
  • Oct 11, 2018 8:06 PM UTC

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+58
  • Celebrity
  • Oct 13, 2018 2:36 PM UTC

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