Workflow design best practices

Hey there!

I’m wondering what is the best approach to creating complex workflows and how to organize them?

Lets say we have registering user workflow under ‘register’ button.
Few things are here to be done.

  1. Validating inputs (don’t know if this can be done, ex. password more than 8 characters and contains letters and numbers)
  2. Checking for provided username uniqueness in db
  3. If this is ok then Sign the user up, send confirmation email, reset inputs, close popup, maybe navigate to some page.
  4. If this is not ok then show user a warning or display some error message

I know this isn’t rather complex but neither it’s easy and straightforward, such example came to my mind, everyone knows whats going on.

How should I tackle this algorithm?

-If conditions are met then trigger custom event with one path of workflow, if not then other custom event with second path? [trigger custom event only when…] => [trigger custom event only when not…] (not optimal because bubble checks conditions twice)

-Or maybe do a validation and if not fulfilled then terminate workflow
(Why there isn’t ‘if else’ workflow action which forks workflow to have two paths? :P)

-Create custom state ‘isValid’ and do a check and set the validation result and trigger next action base on this state?

I didn’t find any guides or tutorials on organizing workflows and interactions between them, if you have such please share :slight_smile:

I’m a software developer and I’m trying to get the ‘bubble mindset’, but it seems my development experience kicks in here and I have tons of questions like ‘why they did it this way?’ or ‘why there is no such option?’ which blocks me from seeing the essence :wink:

Thank you in advance!

This topic was automatically closed after 70 days. New replies are no longer allowed.