I have a web-app with multiple functionalities and each functionality has multiple workflow/process. For example, Workflow A has Steps A => Step F, Workflow B has Steps A1 => Steps G1 and many more workflows. I hope I am able to explain my requirement.
The web-app is written in Angular 6. My task is to create a tutorial mode for all these workflows/processes which provides a guided tour an end-user.
My idea is influenced by introjs library. The web components should show a popup with instructions, a previous button, and a next button. This can be imagined as a finite state machine with only previous and next actions. The previous and next action takes me to a new state.
I have thought about using State Design Pattern, however, since I have multiple workflows with multiple steps, I am assuming that the child state class instances will cause class-explosion for each step.
- How should I mitigate this issue?
- Is there any other design pattern that should complement State pattern?
- or, Is there any other way to tackle this?
I am new to the Design Pattern game and would appreciate your advice.