Skip to main content
Question

submit a job on published workbench


Hi All,

 

 

I want to submit a job to fme server at the end of a "published workbench".

 

Is there any way to achieve this?

 

I googled that it is possible through a python shutdown script. Can someone give any pointers for this approach.

 

 

Thanks

3 replies

david_r
Celebrity
  • June 17, 2013
Hi,

 

 

that would depend somewhat on how the job in configured on FME Server, e.g. if it depends on data being uploaded, etc.

 

 

But if you just need to run a Workspace on your server with some parameters, you can do this using the REST API of FME Server. Example:

 

 

http://fmeserver.com/fmedatadownload/Samples/austinDownload.fmw?FORMAT_GENERIC=MAPINFO&opt_responseformat=json

 

 

This will trigger the Data Download service and give you the response as a JSON object. For more examples, visit the FME Server playground and the documentation.

 

 

As you can see, it is simply a URL that you send along. Using Python, it could be done like this:

 

 

-----

 

import httplib import json   conn = httplib.HTTPConnection("www.fmeserver.com") conn.request("GET", "/fmedatadownload/Samples/austinDownload.fmw?FORMAT_GENERIC=MAPINFO&opt_responseformat=json") resp = conn.getresponse()   if resp.status == 200:     data1 = resp.read()     serverResponse = json.loads(data1) else:     print "Error:", resp.reason      conn.close()

 

-----

 

You now have a dictionary object "serverResponse" that contains all the values returned by the FME Server workspace.

 

 

David

  • June 17, 2013
FMEServerJobSubmitter transformer?

  • Author
  • June 19, 2013
Thanks David for the reply. I got it working now.

 

 

One more thing, i am also using a fmeJOBSubmitter Transformer inside my workbench to call another workbench on server.

 

This thing is working fine in FME Server 2012 but now we have to move our code to FMESERVER 2013.

 

 

In server 2013, the jobSubmitter transformer is not working as it should. I am getting error "myWorkbench.fme could not be opened" altough it is published in server and i am able to select the workbench in job submitter.

 

 

Is there and change in config for server 2013. Please help.

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