Hi @raalst,
I think you will need two workspaces as well:
The first workspace (MakeDropdown.fmw) will read the list of polygons from its data source, then produce an HTML form with a dropdown list. The Submit button in this form will call the second workspace.
The second workspace (MakeReport.fmw) will extract the polygon name from the dropdown, then read that polygon from the source data and find the intersecting zip codes. It will produce an HTML report to stream back to the user.
The MakeReport workspace should published to FME Server first and associated with the data streaming service. Next, create a token for the workspace from the FME Server interface by clicking on the user icon on the upper left and choosing Manage Tokens.
Create an API token to Run the Repository you added the workspace to, with a long expiry (ie. several months or a year). Copy the token to the clipboard.
Edit the first workspace and add both the path and token to the second workspace to the appropriate values in the AttributeCreator with yellow annotation. The path to the workspace will be in the form:
http://<server_name>/fmedatastreaming/<repository_name>/MakeReport.fmw
Save the workspace and publish to the Data Streaming Service.
In the FME Server interface, navigate to the MakeDropdown workspace, then create a Server app for it so it can be used without logging into FME Server. Running this web app in a browser should result in the dropdown web page. Choosing the appropriate polygon and clicking Submit should result in another web page listing the intersecting zip codes.
I am attaching initial versions of the two workspaces. They will need to be adjusted to read from your datasets.
Hi @raalst,
I think you will need two workspaces as well:
The first workspace (MakeDropdown.fmw) will read the list of polygons from its data source, then produce an HTML form with a dropdown list. The Submit button in this form will call the second workspace.
The second workspace (MakeReport.fmw) will extract the polygon name from the dropdown, then read that polygon from the source data and find the intersecting zip codes. It will produce an HTML report to stream back to the user.
The MakeReport workspace should published to FME Server first and associated with the data streaming service. Next, create a token for the workspace from the FME Server interface by clicking on the user icon on the upper left and choosing Manage Tokens.
Create an API token to Run the Repository you added the workspace to, with a long expiry (ie. several months or a year). Copy the token to the clipboard.
Edit the first workspace and add both the path and token to the second workspace to the appropriate values in the AttributeCreator with yellow annotation. The path to the workspace will be in the form:
http://<server_name>/fmedatastreaming/<repository_name>/MakeReport.fmw
Save the workspace and publish to the Data Streaming Service.
In the FME Server interface, navigate to the MakeDropdown workspace, then create a Server app for it so it can be used without logging into FME Server. Running this web app in a browser should result in the dropdown web page. Choosing the appropriate polygon and clicking Submit should result in another web page listing the intersecting zip codes.
I am attaching initial versions of the two workspaces. They will need to be adjusted to read from your datasets.
Looks like the second workspace wasn't attached. Here it is.
thanks !
I was not aware I could generate the whole page, I was assuming I had to call both workspaces via RESTAPI (like in the dynamic form example).