Hint for a form based workflow

Hi! I only recently came across your software and find it absolutely exciting! I would love to use it in a project and just need a push to the right direction (apologies in advance if I do not use the right technical terms or concepts).

In my workflow a user has to fill out a series of web forms. The total number of forms (the path) is based on the inputs and decisions of the user. Some decisions lead to activities or integrations of other services. So far so good.

I imagine that the gateway logic of every form (like “is older then 23” or “has a diploma in physics” or maybe “the entered text does not violate copyright guidelines”) would represent a function in code that after the computation of the payload knows what to call next.

When I would code some kind of frontend that requests “the next form” from an API endpoint:
How would I get to know my next task for being able to fetch the next form? I guess in my endpoint I would use a temporal query?

How would you recommend modelling something like this from a high level perspective?

Welcome to Temporal!

See if this post answers your question.