Skip to Content

Add a Subprocess to an Automation

Learn how to use a subprocess in SAP Build Process Automation.
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.
HaniadjamaiDjamai HaniaApril 29, 2024
Created by
celineaudinsap
June 8, 2023
Contributors
celineaudinsap
Haniadjamai

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.

  • Step 1

    You will incorporate a subprocess within a primary process.

    After completing the prerequisites, your process will look like this:

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

      subprocess
    2. 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
    3. Choose Add a Trigger in the Trigger settings.

      subprocess
    4. Select Submit a Form.

      subprocess
    5. Choose Registration Form.

      subprocess
    6. Choose Save.

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

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

    9. Choose Save.

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

      subprocess
    11. Choose Subprocess.

      subprocess
    12. Choose Learning Path.

      subprocess
    13. Save the process.

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

      subprocess
  • Step 2
    1. 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.

    2. 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
    3. 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.

  • Step 3

    After completing the steps above, your process will look like this:

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

      subprocess
    2. Add a Table with Learners as title.

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

      subprocess
    4. Enter First Name as the field name.

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

      subprocess
    6. Enter Last Name as a field name.

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

      subprocess
    8. Enter Emails as a field name.

      subprocess
    9. Save the form.

  • Step 4
    1. Navigate back to the Manage Trainees Learning Journey process.

    2. 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.

    3. Now choose +.

      subprocess
    4. Select Automation.

      subprocess
    5. Select Blank Automation.

      subprocess
    6. 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
    7. 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.

    8. Choose Save.

      subprocess

    What is a subprocess in the context of automation?

  • Step 5
    1. Go to the Overview Tab. Choose the Create button. Create an artifact of the type Data Type.

      subprocess
    2. A new pop-up will appear.

      • Enter Name of the data type: Learner.
      • Choose Create.
      subprocess
    3. In the Data Type Learner add 3 new fields as such:.

      Field Name Type
      email String
      firstname String
      lastname String
      subprocess
      subprocess
    4. 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.

    5. Similarly, go to the Overview tab. Choose the Create button. Create an artifact of the type Data Type.

      subprocess
    6. A new pop-up will appear.

      • Enter Name of the data type: dataset.
      • Choose Create.
      subprocess
    7. In the Data Type dataset add a new field such as:

      Field Name Type
      Learner Learner
      subprocess
    8. Check List.

    9. Choose Save.

      subprocess

    What are the benefits of using subprocesses?

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

      subprocess
    2. 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
    3. Select the Input/Output section in Automation Details.

      subprocess
    4. Add an input parameter as following:

      • In Parameter Name enter: learners.
      • In Data Type choose: Learner.
      • Check List.
      subprocess
    5. Click on the For Each, enter the value of Set looping List as learners.

      subprocess
    6. Click on the canvas and select the Processes section in Automation Details.

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

      subprocess
    8. Save your work.

  • Step 7
    1. Go to the Overview tab. Select the Learning Path process.

      subprocess
    2. Open the Process Details side panel.

      subprocess
    3. Select the Variables tab in Process Details.

    4. For Process Inputs, select Configure.

      subprocess
    5. Click on add input.

      subprocess
    6. Configure the Process Input as such:

      • In Inputs Name enter: learner.
      • In Inputs Type choose: Learner.
    7. Select Apply.

      subprocess
    8. Now, click on Build Your First Business Process form and configure the General section.

    9. In the Recipients section, under Users select email from Process Inputs.

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

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

      subprocess
    12. Save your work.

    13. Go to the Overview tab. Click on the Assign Learning Journey automation.

      subprocess
    14. Select Learning Path and enter the value of learner as currentMember.

      subprocess
    15. Save your work.

    16. Navigate back to Manage Trainees Learning Journey, select Assign Learning Journey automation to configure the Inputs parameters.

    17. In the Inputs section, in Select list field, choose Learners.

      subprocess
    18. Save your work.

  • Step 8

    After completing Agent Management Settings to Execute the Process with an Automation tutorial, you may release and deploy the process.

    1. In the Manage Trainees Learning Journey process, choose the Release button on the top right corner.

      subprocess
    2. In the Release Project popup, select Release.

      subprocess
    3. In the Overview section that appears, choose Deploy.

      subprocess
    4. Choose an Environment and click on Upgrade.

      subprocess

      Your project is deployed.

      subprocess
  • Step 9
    1. 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
    2. 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.

    3. Navigate to SAP Build lobby, choose My Inbox icon.

      subprocess
    4. 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
    5. 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
    6. Similarly, refresh the inbox again to get the third mission. Once the mission is completed, click on Done.

      subprocess
  • Step 10

    This sample project can be downloaded from the SAP Build Store.

    To retrieve this sample, please follow these steps:

    1. From the SAP Build Lobby, navigate to Store.

    2. Search for the sample project: Learning Journey.

    3. Choose Create from Template to retrieve the sample and save it as a new project in your lobby.

      Store
    4. 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.

    5. Navigate back to the lobby by clicking on the SAP logo.

      Project

      You can see your project is available in the lobby.

      Lobby
Back to top