(Example) Create a Subprocess

This example shows how to create a subprocess for human resources leave verification in an app.

Background and Setup

Use Case

In this example, the Human Resources wants to divide the tasks into a separate subprocess, so that it can be changed without affecting the main parent process.

Final Result

When you complete this example procedure, the finished subprocess will look like this.

Final Result subprocess
When you complete this example procedure, the finished process will look like this.

Final Result process

Prerequisites

Step 1: Create a Subprocess

First, create a subprocess for Human Resources Leave Verification in the Absence Request app.

How to Start

  1. Click App Builder.

    Build Apps screen
  2. On the App Explorer screen, click Absence Request App > Processes > Absence Request App > Process Model.

    Click Process Model
  3. Click New.

    Click New

Procedure

  1. On the New Process Model screen, in the Process Model Name field, enter Human Resources Leave Verification Subprocess.

    Human Resources Leave Verification Subprocess
  2. In the Number of Swimlanes field, enter 0.

    Select Swimlanes
  3. Click Finish.

    The Process Builder opens the process model, Human Resources Leave Verification Subprocess.


    Human Resources Leave Verification Subprocess

Step 2: Configure a Task in the Subprocess

Next, configure a Set Available Leave Hours task in the Human Resources Leave Verification subprocess.

Procedure

  1. In Process Builder, in the Activity Library, open the eForms eForms icon tab.

    Open eForms Tab
  2. On the eForms tab, drag the Standard Task activity onto your process.

    Drag Standard Task
  3. On the eForm Configuration screen, select the Set Available Leave Hours eForm.

    Set Available Leave Hours
  4. Click Next.
  5. On the General Configuration screen, in the Display Name field, enter Set Available Leave Hours.

    Enter Display Name
  6. Click Next.
  7. On the Participants screen, in the Add Roles, Groups and Users field, select Groups.

    Select Groups
  8. In the Search field, enter Human Resources.

    Enter Human Resources

    The Groups list show the Human Resources group.


    Shows Human Resources
  9. On the Details field, drag the Human Resources group.

    Drag Human Resources
  10. Click Finish.

    The Process Builder shows the process model with the Set Available Leave Hours standard task.


    Set Available Leave Hours standard task

Step 3: Configure a Pass Milestone Activity

Next, configure a Pass Milestone activity in the Human Resources Leave Verification subprocess.

This activity, when used together with the Wait For Milestone activity, lets parent process wait for the Human Resources to complete their verification.

Procedure

  1. In Process Builder, in the Activity Library, open the Utilities tab.

    Open Utilities tab
  2. On the Utilities tab, drag the Pass Milestone activity onto your process.

    Drag Pass Milestone activity
  3. On the General Configuration screen, in the Display Name field, enter Human Resources Verification Complete.

    Enter Human Resources Verification Complete
  4. Click Finish.

    The Process Builder shows the process model with the Human Resources Verification Complete Pass Milestone activity.


    Human Resources Verification Complete process model

Step 5: Configure a Subprocess Activity

Next, configure the Human Resources Leave Verification Subprocess activity in the Absence Request app.

How to Start

  1. On the App Explorer screen, click Absence Request App > Processes > Absence Request App > Process Model.

    Click Process Model
  2. Double-click the Absence Request Process.

    Click Absence Request Process

Procedure

  1. In the Absence Request process, delete the Set Available Leave Hours standard task activity.

    Set Available Leave Hours standard task activity
  2. In Process Builder, in the Activity Library, open the Common Common icon tab.

    Open Common Tab
  3. On the Common tab, drag the Subprocess activity onto your process.

    Drag Subprocess activity
  4. On the General Configuration screen, in the Display Name field, enter Human Resources Leave Verification.

    Human Resources Leave Verification
  5. Click Next.
  6. On the Subprocess screen, select Predefined Subprocess (Only From This App).

    Predefined Subprocess Only From This Application
  7. Click Next.
  8. On the Subprocess Model screen, in the Subprocess Model field, select Human Resources Leave Verification Subprocess.

    Select Subprocess Model
  9. Click Next.
  10. On the Subprocess Configuration screen, click Next.

    Subprocess Config Screen
  11. On the Mapping Attributes screen, select Share all Attributes (Basic).

    Select Share all Attributes
  12. Click Finish.

    The Process Builder shows the Human Resources Leave Verification Subprocess activity in the Absence Request Process.


    Human Resources Leave Verification subprocess activity

Step 6: Configure a Subprocess Activity

Next, configure the Wait for Milestone activity in the Human Resources Leave Verification subprocess.

This activity, when used together with the Pass Milestone activity, lets parent process wait for the Human Resources to complete their verification.

Procedure

  1. In Process Builder, in the Activity Library, open the Utilities tab.

    Open Utilities Tab
  2. On the Utilities tab, drag the Wait For Milestone activity onto your process.

    Drag Wait For Milestone activity
  3. On the General Configuration screen, in the Display Name field, enter Wait for Human Resources to Complete Verification.

    Enter Display Name
  4. Click Next.
  5. On the Select Process screen, in the Select Pass Milestone For field, select Sub Process.

    Select Subprocess
  6. Select Predefined Subprocess (Only from this App).

    Select Predefined Subprocess
  7. Click Next.
  8. On the Wait For Milestone Configuration screen, in the Process Models field, select Human Resources Leave Verification Subprocess.

    Select Human Resources Leave Verification Subprocess

    When you select the subprocess in the Wait For Milestone Configuration field, the Milestone Activities for Process Model field shows the Pass Milestone activity associated with the specified subprocess.


    Shows Pass Milestone Activity
  9. Click Finish.

    The Process Builder shows the Wait for Human Resources to Complete Verification Wait For Milestone sctivity in the Absence Request Process.


    Human Resources Leave Verification subprocess activity