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.

Updated over a month 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?