Skip to main content
Hello,

 

 

I have one main workbench which in turn executes other three workbenches. I used shutdown Pythin script to execute the other workbenches from main workbench.

 

 

I am new to FME server and I need to publish this to FME server so that it can accessed in Java Application. I have few questions on this

 

1. As which type of service I would be able to publish e.g. Data Download Service, Job Submitter etc.

 

2. Do I need to publish all four workbenches (main plus three workbenches)  to FME server?

 

3. What is the best way to publish this as a service.

 

4. Are there anything I have missed and should consider before publishing as a service.

 

 

Thanks.
Hi,

 

 

you will discover that FME Server has quite a few differences from the Desktop version. Notably, you will probably have to find a different strategy for chaining your workspaces, e.g. using the Notification (http://fmepedia.safe.com/topic/FME-Server-Notification-Service)-mechanism of FME Server or the FMEServerWorkspaceRunner (http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/fmeserverworkspacerunner.htm) transformer. Even without having seend your shutdown scripts, I would say that there is a good chance they will need reworking for FME Server.

 

 

Your workspaces are published to FME Server using FME Desktop, and you can publish any service type (datadownload, jobsubmitter, etc). I would recommend that your Java application then uses the REST API (http://docs.safe.com/fme/html/FME_REST/) to manage your jobs, etc.

 

 

There are a lot of pitfalls and things to consider when you first start out, particularly since your chaining workspaces. I highly recommend you read up (http://docs.safe.com/fme/html/FME_Server_Documentation/Default.htm) a bit and sit through a couple of (free) webinars first to get a good understanding of how FME Server works, and how it differs from FME Desktop. This one in particular (http://webinars.safe.com/TransformationServer) should be of interest to you.

 

 

Feel free to ask again here if you have specific questions as you go along.

 

 

David
Oh, and here is (http://1spatial.com/event/2014/05/02/webinar-an-introduction-to-fme-server) also another very relevant webinar from 1Spatial.

 

 

David
Thanks David for your reply.

 

My main workbench decides which workbech to call. To achieve this I have used this shutdown script. All three workbenches converts data to CSV.

 

----------------------------------------------------------

 

import os

 

import fmeobjects

 

 

logger = open(FME_LogFileName,'a')

 

DataType=myParam #myParam global Variable

 

current_workspace_dir = FME_MacroValuesr"FME_MF_DIR_UNIX_MASTER"]

 

wsr = fmeobjects.FMEWorkspaceRunner()

 

 

if DataType == 'POINT':

 

   wsr.runWithParameters(current_workspace_dir+"/Point.fmw",{"SourceDataset_GENERIC": FME_MacroValuesM"SourceDataset_GENERIC"]})

 

   logger.write(current_workspace_dir+"/Point.fmw")

 

elif DataType == 'POLY':

 

  wsr.runWithParameters(current_workspace_dir+"/Area.fmw",{"SourceDataset_GENERIC": FME_MacroValueso"SourceDataset_GENERIC"]})

 

  logger.write(current_workspace_dir+"/Area.fmw")

 

elif DataType == 'DATA':

 

  wsr.runWithParameters(current_workspace_dir+"/NonGeom.fmw",{"SourceDataset_GENERIC": FME_MacroValuesI"SourceDataset_GENERIC"]})

 

  logger.write(current_workspace_dir+"/NonGeom.fmw")

 

else:

 

    logger.write("Unknown Type Received : " + DataType)

 

-------------------------------------

 

Could you plase let me know is there any better or efficient way.
Anyone?

@johng - I may be digging this Question up from the grave, but to throw my cents at it...

 

The FME Server Workflow Management Tutorial should give you some direction. The general idea is to create a "master" workspace that has FMEServerJobSubmitter transformers. (This transformer may not have existed when you first asked this question..!)

Reply