Question

How to call a workbench from POST_COMMAND??

  • 11 August 2014
  • 3 replies
  • 2 views

Badge
Hi,

 

    I have two workbenches published in server. First workbench generates an FFS in server. Upon completion of first workbench, irrespective of success/failure, server should call second workbench using POST_COMMAND in SUB_SECTION with FFS location as published parameter.

 

 

I can execute the workbench on system using command line, but i dont know the syntax for above workbench call from server.

 

 

Any pointers will be highly helpful.

 

 

Thanks,

 

Subrat

 


3 replies

Userlevel 4
Hi,

 

 

I'm not entirely sure I understand the question, but have you looked at the FMEServerJobSubmitter transformer?

 

 

David
Badge
Hi Subrat

 

I guess you are talking about the POST_COMMANDs which are available in the fmeEngineConfig.txt which was a way we used to do customization.  They are defined based on service.  But I would not recommend using this approach anymore because it is quite inflexible and the depends on customizing this file.

 

 

David's method would work if you don't need the first workspace to completely finish before the second is started.

 

 

If you do want the first to finish before the second starts you can use the Notification Service like this:

 

 

1. In the FME Server Web User Interface create a topic that will be used as the trigger for the second for example "Second Workspace Trigger"

 

 

 

2. In FME Workbench publish the second worskspace and in the final screen of the publish wizard check notifcation service and click Edit.  Here you can chose the topic "Second Workspace Trigger" this workspace will subscribe to. Which means that topic which will trigger it.

 

 

 

 

 

3. Now publish the first workspace again. When you get the final screen you need to know which service you will be using to strart the first workspace. Assuming it is the Job Submitter service, check it and click Edit where you can select topics under "Notify on Job Completion". Select your topic and in your case use the same topic for success and failure.

 

 

 

 

Badge
Thanks David and Ken.

 

 

Ken,

 

I can only set FME parameters. Is it possible to customise the notification message?

 

 

 

 

Thanks.

Reply