Skip to main content
Question

FME Weekly Quiz: Round 2

  • October 21, 2019
  • 6 replies
  • 22 views

mark2atsafe
Safer
Forum|alt.badge.img+58

Hi FME'ers,

Here's this week's quiz. As before, I'll be back online with the answers tomorrow, and a list of top scores, so I'll see you then.

Quiz: https://demos-safe-software.fmecloud.com/fmeserver/apps/FMEQuiz

It is still a bit experimental (my use of Server apps) so do let me know if it doesn't work for some reason (I do see a bit of an encoding issue with one question, but it should be OK).

Cheers

Mark

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

warrendev
Enthusiast
Forum|alt.badge.img+26
  • Enthusiast
  • October 21, 2019

@mark2atsafe, how do you have the FME Server App workspace redirect set up? So after we run the translation, it brings me to another app that is displaying the score.


mark2atsafe
Safer
Forum|alt.badge.img+58
  • Author
  • Safer
  • October 21, 2019

@mark2atsafe, how do you have the FME Server App workspace redirect set up? So after we run the translation, it brings me to another app that is displaying the score.

To be honest, it's not the ideal setup. I would normally return the scores as HTML (a streamed HTML writer), but unfortunately it opens up a new page, losing the formatting/style of the app page. 

So what I do instead is stream back HTML that redirects you to a new app. e.g. if you scored 3 then it streams back:

<meta http-equiv="Refresh" content="1; url=https://demos-safe-software.fmecloud.com/fmeserver/apps/YouScored3">

That app is set up to look the same as the question page. And if you click run again it just runs a workspace that does the same redirect, but to safe.com.

It's really not a great design because I need an app for each different score, but since there are only 7 possible scores, it's not too bad. 

In the long run I think we'll have to improve this functionality to stream HTML using the same page stylings that an app is set up with. Maybe a workspace transformer (ServerAppHTMLStyler?) that lets me create HTML using the same style options as a Server app? Maybe an option to stream back to the same app page? I don't know, but it's one of those shortcomings you don't really see until something goes into production.


sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • October 21, 2019

Bug in html encoding on last question?


mark2atsafe
Safer
Forum|alt.badge.img+58
  • Author
  • Safer
  • October 21, 2019

Bug in html encoding on last question?

Yes, I noticed that, and yet if you use the app mentioned in question 2, then it looks fine. I shall query the developers about that.


warrendev
Enthusiast
Forum|alt.badge.img+26
  • Enthusiast
  • October 21, 2019

To be honest, it's not the ideal setup. I would normally return the scores as HTML (a streamed HTML writer), but unfortunately it opens up a new page, losing the formatting/style of the app page. 

So what I do instead is stream back HTML that redirects you to a new app. e.g. if you scored 3 then it streams back:

<meta http-equiv="Refresh" content="1; url=https://demos-safe-software.fmecloud.com/fmeserver/apps/YouScored3">

That app is set up to look the same as the question page. And if you click run again it just runs a workspace that does the same redirect, but to safe.com.

It's really not a great design because I need an app for each different score, but since there are only 7 possible scores, it's not too bad. 

In the long run I think we'll have to improve this functionality to stream HTML using the same page stylings that an app is set up with. Maybe a workspace transformer (ServerAppHTMLStyler?) that lets me create HTML using the same style options as a Server app? Maybe an option to stream back to the same app page? I don't know, but it's one of those shortcomings you don't really see until something goes into production.

I think having the ability to customize the fme server translation page would be a great addition.


srg
Forum|alt.badge.img+10
  • October 22, 2019

@mark2atsafe

Whoever designed the second FME quiz deserves an applause on behalf of all the Indians for having included FME Vande Bharat Express or Train 18 as one of the options!

Happy FME -ing :-)

SRG