I completely understand your point, but in my case, the number of steps I need to execute varies depending on specific conditions, such as users, dates, or other factors.
To give you an example, my application is a cost-tracking software for restaurant owners. Users import invoices, create recipes from the items in those invoices, and for each new invoice, the system highlights cost changes and their impact on recipe margins. This involves managing data for invoices, suppliers, items, unique items (grouped lists of items), ingredients, and recipes.
The complexity increases as recipes can also serve as ingredients (sub-recipes for other recipes), requiring additional looping. Not all recipes are sellable, so margins are calculated only for the sellable ones, adding another layer of logic.
Additionally, since cost variations are tied to the invoice date, I need to check if a cost is already recorded for the same date or a later date to avoid duplicates or errors. This requires dynamic checks during each step to ensure data accuracy and integrity.
Given these complexities, I must ensure that one step fully completes before the next begins. I’ve tried implementing this with Custom Events nested within workflows, but I couldn’t achieve the flexibility or control I needed.
That said, I’m no expert, and I might be missing something. If you could share an example of how this logic could work with Custom Events, I’d genuinely appreciate it, it might simplify my workflows significantly !!