Solved

Can SystemCaller trigger another workplace that can be run on FME Desktop?

  • 21 February 2021
  • 8 replies
  • 8 views

Badge +1

I have been trying to set up the command line in the SystemCaller to:

 

"C:\Program Files\FMEDesktop\fme.exe" "\\<UNC path the workspace>\UpdateData.fmw"

 

But this doesn't work. 

 

I have also tried using Task Scheduler for that workspace but it doesn't work either. The workspace never runs. 

Command lines in the batch file: 

"C:\Program Files\FMEDesktop\fme.exe" \\<UNC path>\FME\UpdateData.fmw^
--SourceDataset_XLSXR_7 "\\<UNC path>\DataUpdates.xlsx"

Actions were set as: 

Start a program

Program/Script: UpdateData.bat

Start in: \\<UNC path where the batch file is stored>

 

Any ideas would be greatly appreciated!

 

 

icon

Best answer by ninixink 13 May 2021, 03:16

View original

8 replies

Userlevel 6
Badge +31

Have you tried a WorkspaceRunner?

Userlevel 5
Badge +29

As @nielsgerrits​ mentioned, WorkspaceRunner is the transformer to use here.

 

I do note you have a caret (^) in your system call - you shouldn't need that

 

I'm also assuming you don't have FME Server? There's some really good scheduling tools in that

Badge +7

A few troubleshooting questions:

What does the scheduled task's log say?

Are there any errors?

Did the schedule even run?

Does the user the schedule is running under have permission to run FME and access both the workspace and the data?

 

Apart from the missing double-quotation marks aound the workspace filepath and the extra ^ the batch file seems to be correct.

Badge +8

Hi @ninixink​ 

In your workflow, the only concern is that the USER running the Task Scheduler.

Does that user have permission to access the UNC path?

My recommendation would be to run the batch file as a different user.

Under General --> Change User or Group

 

Badge +1

As @nielsgerrits​ mentioned, WorkspaceRunner is the transformer to use here.

 

I do note you have a caret (^) in your system call - you shouldn't need that

 

I'm also assuming you don't have FME Server? There's some really good scheduling tools in that

Thanks @hkingsbury​ , we do have FMEServer but we have been having issues with it and couldn't figure out how to make it work for more than a month already so I just sort of giving up on using the schedule function in FME Server.

Our problem is we are using arcpy (Esri arcpy 3.6) in the PythonCaller in our workspace to call and delete and append features in our geodatabases.

The workspace works fine in FME Desktop both in my local machine and server machine but failed with FME Server even though in the log files it pointed to the correct python library, it still complained it couldn't find that tool we are using (arcpy.deletefeature_management for example).

It also creates an issue where it burns out our FME Server memory, dumped all Java memory crash logs files in the FME temp folder, and in the end quickly crashes the whole server.

 

Badge +1

Have you tried a WorkspaceRunner?

Thanks @nielsgerrits​ , I have used WorkspaceRunner, it says the workspace run successfully but I don't think the main workspace actually runs since I didn't receive any email sent to my inbox (I've set Emailer in the main workspace to notify when the workspace finishes) and there was no data update.

Userlevel 5
Badge +29

Thanks @hkingsbury​ , we do have FMEServer but we have been having issues with it and couldn't figure out how to make it work for more than a month already so I just sort of giving up on using the schedule function in FME Server.

Our problem is we are using arcpy (Esri arcpy 3.6) in the PythonCaller in our workspace to call and delete and append features in our geodatabases.

The workspace works fine in FME Desktop both in my local machine and server machine but failed with FME Server even though in the log files it pointed to the correct python library, it still complained it couldn't find that tool we are using (arcpy.deletefeature_management for example).

It also creates an issue where it burns out our FME Server memory, dumped all Java memory crash logs files in the FME temp folder, and in the end quickly crashes the whole server.

 

Have you been in touch with support re your FME server? They'll be able to help you diagnose the problem

Badge +1

Thanks, everyone for your answers. I have got it to work in the end and only have time to come back and share my solution/experience and hope someone else might benefit from that. 

 

  • I have changed my code to 1 line only (if you copy straight from FME it will break into several lines), and you only want one line of code in your batch file. And like @hkingsbury​ mentioned above, no caret needed (^). So something like this:
"C:\Program Files\FMEDesktop\fme.exe" \\<UNC path>\FME\UpdateData.fmw--SourceDataset_XLSXR_7 "\\<UNC path>\DataUpdates.xlsx"
  • In the Task Scheduler, Actions were set as follow:

Start a program

  1. Program/Script: \\<UNC path where the batch file is stored>\UpdateData.bat
  2. Start in: \\<UNC path where the batch file is stored>
  • And as @rahulsharma​ mentioned above, the users have to have full access to the UNC path and other paths that are mentioned/used in the bat file and within the FME workspace. 

 

Reply