Skip to main content
All CollectionsFrends FundamentalsFirst Introduction - Subprocesses
Introduction to Understanding the Subprocess View and Using Subprocesses as Error handlers
Introduction to Understanding the Subprocess View and Using Subprocesses as Error handlers

Basics of Subprocess View

Ossi Galkin avatar
Written by Ossi Galkin
Updated over 7 months ago

Understanding the Subprocess View

Simple and minimalist Processes are usually the most elegant and efficient way of implementing highly functioning hierarchies. With Subprocesses you can split the main Process into smaller pieces which will give more flexibility and durability to the Process. Separating the main Process into smaller pieces also helps error handling and makes it easier to find areas that need upgrading.

As was said in the previous module, Subprocesses can be used in multiple Processes and can be called by other Subprocesses. This will simplify the structure of your Frends Process infrastructure as you don't need to create large Processes which perform the same operation, but instead you can split the Process into pieces and reuse the parts that function the same way, saving significant development time and reducing Process complexity.

Error handling is another great way to utilize Subprocesses. Instead of using a Throw to end a failed Process Instance, Subprocesses can be used to handle these errors. For example, Subprocesses can be used to create and send error messages or move failed files into error folders. Frends also has a feature called Unhandled error handling which utilizes Subprocesses to handle every failure in the Process that's not being handled by a Throw Element.

Finally, Subprocesses can be utilized as Triggers for other Subprocesses or a main Process. This is done by using the Conditional Trigger Element which takes a Subprocess as a parameter. The Subprocess will start at the set time.

Using Subprocesses as Error handlers

As stated before, Subprocesses can be used to share functionalities for a number of Processes. This is specifically useful when using Subprocesses as Error handlers. A Subprocess call can take variables which could be used, for example, to send emails, correct data or make different Tasks when triggered. In the example below, Subprocesses are used as Error handlers that take email addresses as variables and send emails to the specified address.

Did this answer your question?