Hi,

I'm working on a desktop application written in C++ with UI code in Qml. It's a typical 3d (engineering) application (think something like autocad, 3dsmax,..., but smaller). There is one thing which often comes back and to which I didn't find a satisfying solution yet and that's handling "a workflow with questions to the user". To give an example: Let's say the user wants to start a new project when another one is open - if there are changes, ask whether to save them or not - if no, quit, start a new project and ask properties for this project to open, if yes, check if there is already a file/folder to save - if no, ask a file to save, if yes check the types of items in the project - Depending on the type of items, ask the user if they are needed to be saved in the project or not - if not, go to next type, if yes, check if this item type needs certain "save settings" (for instance compression factor of a picture, whether to save a 3d model binary or ascii,...), and so on and so on... .
Every time, i try to invent a new approach to solve such problems, but I never found a good solution. The reason is there is a lot of (already working) imperative code (and my mindset is probably to imperative :-)). Is there some sort of design pattern to follow to keep this clean? Or how do you solve such problems?
Thanks for the ideas,

Jan