Using Subprocesses in other Processes
You can call a Subprocess from a Process by adding the Subprocess Element to your Process.
In the Editor, you can select which Subprocess you want to call from the dropdown menu. After selecting the Subprocess, parameters for that Subprocess will be visible in the Parameter Editor. If you do not provide a value for a parameter, the default value will be used instead. If you did not set a default value for the parameter, the value for that parameter will be null. In this case, null checks need to be done in the Subprocess, or the Subprocess will throw an error if you try to use the null-value in Process steps.
In the advanced settings, you can set a description for the Subprocess call, skip logging of results and parameters and promote results. In addition, you can set a remote call for the Subprocess. Turning this option on allows you to select which Agent Group you want the Subprocess to be executed in for each Environment you have. You can also set a timeout period if the Agents in that Agent Group do not respond. By default, Subprocesses are executed in the same Agent Group as the calling Process. A remote call is a useful option for cases in which you want to execute the Subprocess in a Process in a different Agent Group than the calling Process. For example, if you want to run a Process in a Cloud Agent, and you want to call a Subprocess which executes database queries, but you can only run those queries in an On-premise Agent, you can order the Subprocess to be executed in the Agent Group which contains On-premise Agents.
After adding the Subprocess call to your Process, that Subprocess must first be deployed to the Agent Group in which you want to deploy your calling Process. If you haven’t deployed the Subprocess to the Agent Group first, Frends will give you an error indicating which Subprocesses are missing from the Agent Group. You can also see which Subprocesses should be available in the Agent Group while deploying the calling Process to the Agent Group.
The next article is Example Process used in the course