Skip to main content
Solved

Trying to figure out how to do a Server App with validation of user input (with FME Server 2022.2.3)

  • March 13, 2023
  • 6 replies
  • 82 views

mlupien
Contributor
Forum|alt.badge.img+7

Trying to figure out how to do that with FME Server 2022.2.3

  1. Have the user fill a form ( my guess: Server App with User Parameters)
  2. Validate the data entered by the user (lookup into a database for existing value)
  3. If the data is good, process the data and confirm the user that the processing succeeded.
  4. If there are any errors in the user input, the user should be prompted to correct the input and submit for validation again.
  5. When data is submitted correctly, an email is sent to the supervisor with a link that will allow him to validate and complete extra data fields (such as authorization number)

I thought that I would be able to do this with Server Apps, Automations or Webhooks, but I can't figure out how to direct the user to a "second step" input .

Any Idea is welcome :)

 

Thank you.

Best answer by redgeographics

I think you can do that validation step within the workspace that's used for the Server App and then use a FMEServerJobSubmitter to start the workspace for step 3 & 5

 

If you have workspace 1 publish to a data streaming service you can have all the user communication in there. The only tricky bit would be step 4, but if you post a message instructing the user to go back to the initial form I think that could work.

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

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • Best Answer
  • March 14, 2023

I think you can do that validation step within the workspace that's used for the Server App and then use a FMEServerJobSubmitter to start the workspace for step 3 & 5

 

If you have workspace 1 publish to a data streaming service you can have all the user communication in there. The only tricky bit would be step 4, but if you post a message instructing the user to go back to the initial form I think that could work.


virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • March 14, 2023

I think you can do that validation step within the workspace that's used for the Server App and then use a FMEServerJobSubmitter to start the workspace for step 3 & 5

 

If you have workspace 1 publish to a data streaming service you can have all the user communication in there. The only tricky bit would be step 4, but if you post a message instructing the user to go back to the initial form I think that could work.

If you're really clever the initial DataStreaming result could be a webpage (e.,g HTML) which has the ability to make a subsequent rest call to FME Server. But to be honest I think @Hans van der Maarel​ suggestion is enough


mlupien
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 22 replies
  • March 14, 2023

I think you can do that validation step within the workspace that's used for the Server App and then use a FMEServerJobSubmitter to start the workspace for step 3 & 5

 

If you have workspace 1 publish to a data streaming service you can have all the user communication in there. The only tricky bit would be step 4, but if you post a message instructing the user to go back to the initial form I think that could work.

Thank you, @Hans van der Maarel​ , for your reply.

I'll have a look to the FMEServerJobSubmitter. Is it only a background process or if it will give the user feedback ?

 

I may have a look to @virtualcitymatt​ suggestion too.

 

About Webhooks, is there a way to capture "currently logged in user" since it is using a Token ?

 

Thank you.


virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • March 15, 2023

Thank you, @Hans van der Maarel​ , for your reply.

I'll have a look to the FMEServerJobSubmitter. Is it only a background process or if it will give the user feedback ?

 

I may have a look to @virtualcitymatt​ suggestion too.

 

About Webhooks, is there a way to capture "currently logged in user" since it is using a Token ?

 

Thank you.

While I haven't tried it you can see if these give you what you're after. I suspect what is returned will be the owner of the token

image


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • March 15, 2023

Thank you, @Hans van der Maarel​ , for your reply.

I'll have a look to the FMEServerJobSubmitter. Is it only a background process or if it will give the user feedback ?

 

I may have a look to @virtualcitymatt​ suggestion too.

 

About Webhooks, is there a way to capture "currently logged in user" since it is using a Token ?

 

Thank you.

The FMEServerJobSubmitter just submits the job, there's no feedback there


mlupien
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 22 replies
  • March 17, 2023

I think you can do that validation step within the workspace that's used for the Server App and then use a FMEServerJobSubmitter to start the workspace for step 3 & 5

 

If you have workspace 1 publish to a data streaming service you can have all the user communication in there. The only tricky bit would be step 4, but if you post a message instructing the user to go back to the initial form I think that could work.

Thank you for your answers,

I finally went with @Hans van der Maarel​  idea.

Only problem, so far is when I go back to my form, using the back button of my browser for example, the form is blank. Any Idea on how I could go back to the values that were entered by the user ?

Thank you again