FMEServerJobSubmitter/Waiter: Callback result or custom message from successful

Related products: FME Flow

***Note from Migration:***



Original Title was: FMEServerJobSubmitter/Waiter: Callback result or custom message from successful job




Wouldn't it be nice if we could post something back to the calling workspace, e.g. in a _customMessage string attribute on the FMEServerJobSubmitter output, or by actually having the FMEServerJobSubmitter output the data from the "Data to Post" writer setting (set when you publish the job)?

Upon success, a job can post data to a notification topic. This is great, but if I want to perform some logic on this data, I cannot really do this directly. I would like to be able to receive this posted data from the FMEServerJobSubmitter/Waiter and let some transformers decide what to do next with this data.

I could of course write the data from the submitted job to some location and read it after success with a FeatureReader (which is what I am doing now), but that feels a bit dirty and also requires some file management.


If you tell the transformer to wait for results, then you can set the 'Output Data Location' parameter to 'Temporary' and then the data is written to a temporary location and that location is returned to the calling workspace via an attribute list named 'output_datasets{}'. The temporary data will be cleaned up automatically. Check out the following tutorial and let us know if that provides what you need:

https://knowledge.safe.com/articles/1439/fme-serve...


Thanks Aaron, that is useful information! How would it work in an asynchronous situation though?


I'm going to assume that 'asynchronous' means when the transformer is set to not wait for results. In that case the workspace will proceed and may finish before the child is complete. I think it would really help this Idea if you could provide a bit more context around what you want to achieve. Instead of 'it would be nice', you could frame your idea as a problem to be solved: I have to do X to achieve Y, and <this part> of X is a real pain. I hope that makes sense.


For me the idea of having a custom message is still relevant if you want to push some sort of reporting up to the controler workspace. Complex workflows frequently request some communication between workers and controlers. TopDown comunication can be done through published parameters but there is no BotomUp communication.

Cheers


I would love to be able to propagate a message back to the controlling workspace. The _statusMessage `A fatal error has occurred. Check the logfile above for details' is not terribly helpful.


Sorry Aaron, I only see your comment now.

 

For our situation, the need for this enhancement has somewhat declined. However, I think it would be very helpful if there was some kind of custom value/object that could be added to the JSON result object in the FME Server REST API. In there, we could pass in anything that the requesting website or application might need (e.g. job statistics, a file path etc.) by simply calling GET /transformations/jobs/id/< jobid >/result. I guess it would then take little effort to have the FMEServerJobSubmitter read this custom object as well.