Skip to main content

Hello FME community, here’s an outline of what I’m trying to accomplish:

The fmw is included as a FME Server Workspace App (Server version 2021.2.5, Build 21816 - Linux). 

The fmw searches for features within a specified area (drawn by the user in the map) and if features intersect the drawn area, they are bundled into a FeatureWriter and provided to the user via a DataStreaming service. This works great when features are intersected.

When features are not intersected, a NoFeaturesTester (stored in the same Repository as the fmw) directs the output to create a HTML file (FeatureWriter_3), created and stored in $(FME_SHAREDRESOURCE_TEMP). This file says something like “No results returned, the are no features of type X.Y,Z in the extent MinX, MaxX, MinY, MaxY...etc).

Each time I test the App, the html file is created and populated correctly.

 

Now the bit I don’t know is possible: at the end of the process is a SystemCaller which is attempting to open the HTML file in a new web browser tab (whichever browser is open at the time) so the user receives the feedback. However, when no features are returned, the App defaults to displaying the message below in the App Window, which doesn’t provide sufficient info for the user.

 

I have tried the following within the SystemCaller: (I’m not a developer and don’t know if the commands are correct or acceptable in this environment, and or possible in this environment, just tried various things based on internet research):

  • $(FME_SHAREDRESOURCE_TMEP)/MyResults.html
  • open $(FME_SHAREDRESOURCE_TMEP)/MyResults.html
  • open $(FME_SHAREDRESOURCE_TMEP)/MyResults.html &
  • xdg-open $(FME_SHAREDRESOURCE_TMEP)/MyResults.html &
  • cat $(FME_SHAREDRESOURCE_TMEP)/MyResults.html
  • cat $(FME_SHAREDRESOURCE_TMEP)/MyResults.html &

Is opening the html file in this environment possible? 

What is the command to open the file?

 

I assume you're registering the workspace with the Data Download service. Check the services (either when you publish the workspace or from the FME Flow Workspaces section and see if the HTML writer is also going to the Data Download service.

However, you may want to consider doing the whole thing with Data Streaming and have the FeatureWriter write out to a temp location and then share that link via a HTML stream as well.


Hi @redgeographics 

the Data Download service is active. Today I republished the workspace and edited the Data Streaming service to include FeatureWriter_3 (see image above). This small action allows the html to open correctly when no features are returned.

The command in the SystemCaller was simply $(FME_SHAREDRESOURCE_TEMP)/MyResults.html


Reply