Workflow Scenario (Recommended Practice)
Author:
Fluent Commerce
Changed on:
16 Jan 2025
Overview
Walkthrough of an example scenario that demonstrates the advantages of following recommended practices in workflow design.
Key points
- Smaller, granular rules offer better flexibility and adaptability, allowing for easier updates when requirements change.
- Composing logic within the workflow gives clients and partners more control over business processes, reducing the need for expensive and time-consuming development changes.
- Workflow-based logic enhances transparency and makes the process details more accessible, avoiding the "black box" effect of code-based logic.
- Granularity in workflows leads to richer audit events, which improves triage and problem identification, resulting in faster issue resolution.
Scenario 1
Now, let's look at a scenario that demonstrates the benefits of following the recommended practices that we've seen so far.
Here's what the partner creates... they take all three of the client's requirements and build it into a single Rule.
3 months later, the client returns with a request to update one of their requirements.
Scenario 2
Now, let's look at the same scenario but with a different Partner who follows Best Practice advice and isolates logical gates to their own Ruleset.
Here's what the partner creates... They take the client's requirements and build a separate Rule for each of them.
3 months later, the client returns with a request to update one of their requirements.
Conclusion
If we go back and look at Scenario 1, we see that building all the requirements into a single Rule is an Anti-pattern and will cost the client additional time and money to resolve.
In the second scenario, because the partner built the Business Logic into the workflow, not the rule, it was easier for them to update the requirements without having to charge their clients for additional time spent fixing these changes.
Key takeaways from this scenario
- Smaller, more granular rules are more composable and reusable, resulting in more configuration-based flexibility and adaptability, ultimately providing agility when requirements or market conditions change.
- Composing logic in the workflow (rather than code) allows clients and partners more control over their business processes and reduces the cost and time spent on change requests for development teams.
- Lifting business logic into the workflow makes the logic and process detail more transparent and not locked into a “black box” in code. Granularity in the workflow also results in richer audit events, which make triage and problem identification more efficient and result in faster issue resolution times.