Question

Embedding HTML content in Workspace App

  • 29 January 2022
  • 4 replies
  • 46 views

Badge +4

In the past I asked this question. Things have developed and now I want to use a HTML table, which is the outcome of a FME workbench, in a workspace app. Something like this:

 

HTML table in Workspace AppWithin my HTML table I included sorting and search functionality. These were included in the FME app before. You entered a search string as a User Parameter - Hit Enter - Browser with found HTML content was shown. To improve my app I removed the FME search function and put everything directly in the HTML table.

 

Is this possible in a workspace app?


4 replies

Userlevel 5
Badge +29

You could have you workspace app run as a streaming service with the streamed data being the table

Badge +2

As hkingsbury mentioned, you just need to have an HTML writer in the workspace and register the HTML writer with the streaming service (when publishing to FME Server).

imageFrom there, any HTML content that is sent to the writer will be streamed back to the user. If you need to create your own custom HTML it can be done either in the HTMLReportGenerator or by typing it in an AttributeManager in the html_content attribute. See this sample app which uses a sortable/filterable table for example. I take no credit for the HTML content, sample HTML/JS was provided here... I just re-worked it using transformers in a workspace so HTML is not fully hardcoded.

Badge +4

Thanks guys for your answers! @chrisatsafe​ @hkingsbury​ 

 

My app till so far worked as suggested by hkingsbury. A user gives a search string, then a new browser opened with the search results in a HTML table. This is a streamed table using 'Data Streaming'.

 

Next step is to get something like the example app you posted. My current table is standalone HTML and doesn't need User Parameters. I would like to run it every night for example to create up-to-date table. A user will visit a page (like your example app) and searches within the table for content. Hence, there is no need to run FME scripts at that moment. The HTML content is already created.

 

Can I get there using this way and include my HTML file in the description for example:

 

FME Workspace App..or do I need something like FME cloud which is used in the sample app?

Badge +10

Thanks guys for your answers! @chrisatsafe​ @hkingsbury​ 

 

My app till so far worked as suggested by hkingsbury. A user gives a search string, then a new browser opened with the search results in a HTML table. This is a streamed table using 'Data Streaming'.

 

Next step is to get something like the example app you posted. My current table is standalone HTML and doesn't need User Parameters. I would like to run it every night for example to create up-to-date table. A user will visit a page (like your example app) and searches within the table for content. Hence, there is no need to run FME scripts at that moment. The HTML content is already created.

 

Can I get there using this way and include my HTML file in the description for example:

 

FME Workspace App..or do I need something like FME cloud which is used in the sample app?

Hi @lambertus​ ,

Perhaps you don't need a workspace app for your users to access the html table. If you are going to run your FME workspace nightly to update the html file, then you really just need to provide your users with a link to open the html file. This could be done simply by using a folder link to the file in your internal network or hosting it on site somewhere to access it on the internet.

You may be able to link to it in a Gallery App on FME Server too. I haven't tried this, but I wonder if you could write the html file to a Resources folder on FME Server, and then have your Gallery App link point to that.

Reply