Add a Subprocess to an Automation
Learn how to use a subprocess in SAP Build Process Automation.
Overview
You will learn
- How to add a subprocess in a process.
- How to add a subprocess in an automation.
- How to send tasks to multiple participants.
Prerequisites
Prerequisites
Steps
Intro
Using subprocess in your automation enables you to easily reuse existing code segments in various processes. This re-usability eliminates the need for duplicating the same code multiple times, saving you valuable time and development efforts.
Furthermore, incorporating subprocess in your automation allows you to divide your tasks into smaller and more manageable units. This simplifies the comprehension and maintenance of your automated system.
You will incorporate a subprocess within a primary process.
After completing the prerequisites, your process will look like this:

Navigate to the Overview tab. From the editable version of your project, click the Create dropdown and choose Process.

subprocess In the Create Process dialog box, do the following:
- Enter a Process Name such as Manage Trainees Learning Journey.
- Choose Create.

subprocess Your new process opens in the process builder. You will now create a trigger form that will start the process.

subprocess Choose Add a Trigger in the Trigger settings.

subprocess Select Submit a Form.

subprocess Choose Registration Form.

subprocess Choose Save.

subprocess Navigate back to the Overview tab. Select the Learning Path process.

subprocess Choose the three dots of the Trigger form and select Remove.
Choose Save.

subprocess Go back to Manage Trainees Learning Journey process, select + under Registration Form.

subprocess Choose Subprocess.

subprocess Choose Learning Path.

subprocess Save the process.
Now you have an optimized process that incorporates a subprocess, making it more efficient and streamlined.

subprocess
To release and deploy a process, please refer to step 1 and 2 of the tutorial on how to release and deploy a process Run the Business Process.
In the Overview section, open the process Manage Trainees Learning Journey process of the deployed version, choose Registration Form and select the Copy Link icon next to the Form Link field.

subprocess Now paste the Form Link into a browser. When the form opens in the browser, you will have the course presentation fields that you defined in the Registration Form. Click on Start.

subprocess Now, you will receive the training materials directly in your inbox, just like you did in the Add Links to Forms tutorial.
In the next steps, you will cover the usage of a subprocess within an automation and also demonstrate how to distribute the learning path to multiple learners simultaneously.
After completing the steps above, your process will look like this:

From the editable version of your project, select the Registration Form, choose the three dots and select Open Editor.

subprocess Add a Table with Learners as title.

subprocess Choose the + icon in the table and select Text.

subprocess Enter First Name as the field name.

subprocess Choose the + icon next to the First Name field and select Text.

subprocess Enter Last Name as a field name.

subprocess Similarly choose the + icon next to the Last Name field and select Text.

subprocess Enter Emails as a field name.

subprocess Save the form.
Navigate back to the Manage Trainees Learning Journey process.
Select the three dots next to the Learning Path subprocess and choose Remove.

subprocess What’s going on?
You will remove the subprocess from the main process. Our objective is to create an automation that utilizes the Learning Path subprocess to send the learning path to multiple users at once.
Now choose +.

subprocess Select Automation.

subprocess Select Blank Automation.

subprocess A pop up will appear to configure the Desktop Agent version. Do the following in the pop up:
- From the dropdown, select the version of the Desktop Agent installed on your machine. It would be displayed with suffix as Registered.
- Select your platform.
- Choose the Confirm button.

subprocess A new pop-up will appear to create the automation. Do the following in the pop-up:
- Under Name enter: Assign Learning Journey.
- Choose the Create button.

subprocess An automation Assign Learning Journey will be created successfully.
Choose Save.

subprocess
Go to the Overview Tab. Choose the Create button. Create an artifact of the type Data Type.

subprocess A new pop-up will appear.
- Enter Name of the data type: Learner.
- Choose Create.

subprocess In the Data Type Learner add 3 new fields as such:.
Field Name Type emailString firstnameString lastnameString 
subprocess 
subprocess Choose Save.

subprocess Your data type gets created and you can view it in the list of artifacts in the Overview page.
Now you will create a second data type.
Similarly, go to the Overview tab. Choose the Create button. Create an artifact of the type Data Type.

subprocess A new pop-up will appear.
- Enter Name of the data type: dataset.
- Choose Create.

subprocess In the Data Type dataset add a new field such as:
Field Name Type LearnerLearner 
subprocess Check List.
Choose Save.

subprocess
Navigate back to the Manage Trainees Learning Journey process and select the three dots next to Assign Learning Journey automation, choose Open Editor.

subprocess In the Automation Details section on the right, search for the For Each activity and drag and drop the activity into the automation flow.

subprocess Select the Input/Output section in Automation Details.

subprocess Add an input parameter as following:
- In Parameter Name enter:
learners. - In Data Type choose: Learner.
- Check List.

subprocess - In Parameter Name enter:
Click on the For Each, enter the value of Set looping List as
learners.
subprocess Click on the canvas and select the Processes section in Automation Details.

subprocess Select Learning Path and drag and drop the activity into the automation flow inside the For Each loop.

subprocess Save your work.
Go to the Overview tab. Select the Learning Path process.

subprocess Open the Process Details side panel.

subprocess Select the Variables tab in Process Details.
For Process Inputs, select Configure.

subprocess Click on add input.

subprocess Configure the Process Input as such:
- In Inputs Name enter:
learner. - In Inputs Type choose: Learner.
- In Inputs Name enter:
Select Apply.

subprocess Now, click on Build Your First Business Process form and configure the General section.
In the Recipients section, under Users select email from Process Inputs.

subprocess Select the Boost Your Business Process with Automation form to configure the General section. In the Recipients section, under Users select email.

Similarly, select the Create Tables in the Form form to configure the General section. In the Recipients section, under Users select email.

subprocess Save your work.
Go to the Overview tab. Click on the Assign Learning Journey automation.

subprocess Select Learning Path and enter the value of learner as
currentMember.
subprocess Save your work.
Navigate back to Manage Trainees Learning Journey, select Assign Learning Journey automation to configure the Inputs parameters.
In the Inputs section, in Select list field, choose Learners.

subprocess Save your work.
After completing Agent Management Settings to Execute the Process with an Automation tutorial, you may release and deploy the process.
In the Manage Trainees Learning Journey process, choose the Release button on the top right corner.

subprocess In the Release Project popup, select Release.

subprocess In the Overview section that appears, choose Deploy.

subprocess Choose an Environment and click on Upgrade.

subprocess Your project is deployed.

subprocess
In the Overview section, open the process Manage Trainees Learning Journey of the deployed version, select Registration Form and choose the Copy Link icon next to Form Link field.

subprocess In a new tab in your browser, paste the form link. Enter the information of the learners in the table for whom you intend to send the learning path and choose Start.

subprocess After clicking on Start, all the learners you have added to the table will receive the project tasks in their Inbox.
Navigate to SAP Build lobby, choose My Inbox icon.

subprocess You will see the first task First Learning Mission appear in the My Inbox application that ships with SAP Build. The task will have the description of the training to be followed and the link to the tutorial. After finishing the mission, select I have completed the first mission and click on Next.

subprocess Refresh the inbox again to get the second notification to the second mission. Now you can see task Second Learning Mission appear in My Inbox. After finishing the mission, click on Next.

subprocess Similarly, refresh the inbox again to get the third mission. Once the mission is completed, click on Done.

subprocess
This sample project can be downloaded from the SAP Build Store.
To retrieve this sample, please follow these steps:
From the SAP Build Lobby, navigate to Store.
Search for the sample project: Learning Journey.
Choose Create from Template to retrieve the sample and save it as a new project in your lobby.

Store Give your project a name and choose Create.

Create Your project gets created in editable version. You may release and deploy it and run the project.
Navigate back to the lobby by clicking on the SAP logo.

Project You can see your project is available in the lobby.

Lobby
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.