Decision-Trees-like data

I have multiple classes, and for each class, I have decision tree data ( every node has a question, and depending on the answer, it should ask for the next question). how can I implement this using rasa?

My idea is that I store the class in a slot and then open a form, but the following slots that I would need to fill would vary depending on the answers to the previous questions, so it’s now static. I have the questions texts and their answers stored in a database. I need to store the answers to the questions as well. the ideal solution is to somehow fire a question action, where I would ask a question, and get the answer, then ask the next question, and so on.

Have you tried implementing your use case with a dyanmic form and the required_slots method as described here?

I thought of using it, but when would then I would need for so many ask_actions to ask for the slots, as each slot would need a question and an answer, correct?