Skip to main content

Hello,

 

As part of an application I am developping, I am using the FME Flow API to submit a job asynchronously (using the webservice POST /transformations/submit/< repository >/< workspace >).

 

I have also created a specific webservice used in the workspace runned on FME Flow so it can communicate specific information about the result of the workspace to my application.

 

I would like to know if there is a way to use the jobid returned in the response body of webservice POST /transformations/submit/< repository >/< workspace > in my workspace so that it can be passed as a user parameter in the HTTPCaller used to call the webservice I have developped.

 

It would be very usefull for me so that I could create a link between the job sumitted on FME Flow and the information it sends back to my application using the webservice I have developped.

 

I remain at your disposal for any additional information.

 

Best regards,

Should I use the parameter [FME_JOB_ID] of the FME Server Parameters when authoring my workspace on FME Desktop as a parameter in my HTTPCaller ?


Maybe I'm missing something, but why not simply use the FMEServerJobSubmitter to start the job, rather than going through the REST API? The transformer will return the job id as an attribute.


Hello David,

 

Thank you for your answer. I attached a diagram of my application and how it communicates with FME Server. I will have neither possibility to run the workspace on FME Deskstop nor to allow the user to access the server directly because the workspace runned on the server will access highly sensitive data that has to be managed in an separate environment.

 

My_app 

If you refer to my diagram:

  • First, in the UI of my application, an authenticated user select which workspace he wants to run of FME Server (1) ;
  • Then, the backend of my application performs a call on FME Server API to submit the workspace for transformation (2) and my backend will use the job id returned by the API to create a new entry in my database to register which user has requested which workspace to be runned and when ;
  • In the workspace runned on FME Server, an HTTPCAller will perform a call on a webservice of the API of my application to send back some information regarding the outcome of the workspace (3) ;
  • Finally, in the UI of my application, the user will access this information (6).

 

I would like to know if the workspace runned on the server in (2) could use the job id returned by FME Server API in its response so when the workspace performs a call on my API in (3) to send back some information, I can link the information sent back to the job id I stored in (2).


Should I use the parameter [FME_JOB_ID] of the FME Server Parameters when authoring my workspace on FME Desktop as a parameter in my HTTPCaller ?

This would indeed be the official way to do it, yes. The value will be defined automatically once your workspace executes on FME Server/Flow.


This would indeed be the official way to do it, yes. The value will be defined automatically once your workspace executes on FME Server/Flow.

Hello David,

This works perfectly. Sorry for having replied to your other answer, I missed this one.


Reply