Skip to main content
All CollectionsWorkflows
Splitting Up Workflows for Efficient Workflow Development
Splitting Up Workflows for Efficient Workflow Development

Splitting up workflows is a common pattern that we highly recommend for a few important reasons.

MaryGrace avatar
Written by MaryGrace
Updated over a week ago

Separation of Concerns

One of the key principles in software development is separation of concerns. Although this principle is typically associated with software development, it can easily be applied to workflow development as well. When designing a workflow, it is crucial to consider its purpose and identify any atomic processes within it that could be reused elsewhere. If you find yourself with a workflow that contains reusable elements, it is a clear sign that splitting up the workflow would be more beneficial.

Length and Complexity

Another factor to consider when deciding whether to split up a workflow is its length and complexity. If your workflow exceeds 15 steps, it may become increasingly challenging to maintain and understand. However, this is not necessarily a negative aspect. It could indicate that certain components within the workflow can be "abstracted out," similar to refactoring in algebra. By breaking down a complex workflow into smaller, more focused components, you can enhance maintainability and readability.

Practicality and Orchestration

In today's advanced technological landscape, we have a vast array of integration and orchestration capabilities at our disposal. These capabilities change the way workflows are triggered, such as using events like a contact being updated in Salesforce or specific time intervals. For such scenarios, it is often more practical to split out the workflow into triggering workflows, which solely handle the trigger and call the main workflow. This approach not only separates concerns and reduces duplication, but it also makes testing and iterating much smoother since you no longer have to wait for events to occur.

Considerations for Workflow Splitting

While splitting up workflows offers numerous benefits, it is essential to consider practicality and how components will be used when deciding whether to split or keep everything in one place. For instance, if you desire the output of a child workflow to be used in the subsequent step of your parent workflow, using the "run workflow" option, which runs the child workflow without keeping track of what happens, may not be practical. However, we have exciting news! We plan on releasing a new action called Run Inline, which will call the workflow and return the outputs to the calling step, making it much easier to break up complex workflows. Once Run Inline is available, feel free to explore the tremendous possibilities it offers. Until then, make sure to assess how something will be used as you contemplate splitting or keeping everything in one place.

We hope this article has provided you with valuable insights into the benefits of splitting up workflows for efficient workflow development. By implementing this approach, you can enhance maintainability, scalability, and overall workflow performance. Happy building!

Did this answer your question?