Creating Subprocesses to Update Previously Submitted Inspections

Learning Concepts in this Skill Station:
What is a subprocess?
Creating a subprocess
Using smart steps
Using/calling a subprocess, aka a process fragment
Restricting subprocesses to user roles

Video Tutorial:



What is a subprocess? 

Throughout this Learning Line, we’ve made work streams with clear beginning and end points. In Pulpstream you can use subprocesses to retouch or update data.

A subprocess is a fragment of a work stream. They exist to give knowledge workers the opportunity to retouch or update data. An example would be to update an inspection, 6 months after it occurred. Another example can be found in an Expense Approval use case. An expense approval request may need to be resubmitted because something changed.

A subprocess is just like the main business process, which we refer to as a work stream.

The 3 main differences are:

1) Users can manually invoke subprocesses.
2) Processes can invoke subprocesses for doing something that both the stream and the subprocess have in common, such as calculating a score.
3) Subprocesses can be accessed in the user interface from a button in a record’s details.

We are going to explore those 3 situations at this Skill Station.

Creating a Subprocess

Let's start by going to our Stream Definition canvas and checking out our Safety Inspection work stream. Add comments to keep the logs up to date. eg  “Adding subprocess to stream.”


Next, let’s clone the stream. On the left side of your Stream Definition canvas, you’ll see the name of your stream in the navigation menu. Click on that. In that pull-down menu you’ll see a clone button. Click on that.


We will use this cloned process to update the scoring and reporting parts of our work stream. In the popup menu, call it “Scoring and Reporting.” Leave the “Allow Manual Start” button unchecked, because it will only be used by other processes.


Save your changes.

On the left side of your Stream Definition canvas, you will see that the name of the work stream that’s in focus has changed to “Scoring and Reporting.” You can see in the save buttons that the system recognizes it as a subprocess. Before we save it, let's make a few changes.

Using or “Calling” a Subprocess

In your stream, delete the Corrective Action Tasks step. The connectors should disappear.  Create a new connector between the Send Report step and the End step. Save the subprocess.


Let's go back to the main process work stream by clicking on the stream name in the pull-down menu. Click on “Safety Inspections Process.” Delete the Calculate Score step. Delete the Send Report step. We’re going to replace them with a new Smart Step.

In your Stream Canvas options navigation menu, click on the “Smart Steps” pull-down menu. Click on “Call Subprocess” and drag it down onto your canvas.


In the popup, select the subprocess we just made from the pull-down menu. (It’s called “Scoring and Reporting.”) Save your changes.

We’ve now replaced a step in the work stream with a subprocess. Back on the Stream Definition canvas, connect each of the steps.


Save your changes.

Now that we have a subprocess to filter our scores and reports, we’re going to add another subprocess to update the inspection. From your Stream Definition canvas, on the top left border of your canvas options, click on the name of your stream. In the pull-down menu, click on “Add New Subprocess.”


Name it “Update Inspection.” We want users to be able to access this, so click on the “Allow Manual Start” box. If you enable “manual start” this subprocess will be available on a record’s details as a process fragment that can be started or stopped on demand. If this is not checked, this subprocess would only be able to be called, or used by work streams.

Note: If you ever need help understanding what a field does, click on these question marks by the field titles to reveal helpful information.

Next, let's tell Pulpstream what form to show a user when they want to use, or call this subprocess. We want to show the user the original inspection record, so they can update it. To do that, here in the record options pull-down menu, choose “Start Form.” Choose the “Inspection Form.”


Save your changes.

After a user submits an update to the system, we want to recalculate the score and generate a new report. We’re going to call the subprocess we created earlier to do that. In your Stream Definition canvas navigation menu options, click on “Smart Steps.” Find the “Call Subprocess” step. Click on it and hold your mouse down to drag it onto your canvas.


Select “Scoring and Reporting. ”Connect the Start process step to the Scoring and Reporting subprocess. Drag an end point onto the screen. Connect it to your end point.


Save your changes.

Create a test record to see what a subprocess looks like on a record.

Next, lets see what our subprocess looks like in the system. In your navigation menu, click on “Your Records.” In the sub navigation menu, click on the “Submitted by You Tab.” Here, you’ll see all the inspections that are in process. Those will be completed after a pending action such as a corrective action is completed.

Look at the Update Inspection fold in the record accordion here. It now has a yellow Start Process button. Click on that to see the Inspection Form.  You can also view your flow from here. Click on the gear icon next to that yellow button. Click on “View Flow.”


The Inspection Form will popup. Submit it without making changes. After you do that, the status of the record will change to In process.


The subprocess will start running. See that in the Your Records on the Completed Tab. You can see the flow by clicking on the record’s gear icon. Click on “View Flow” in the pull-down menu.

After you complete the process, the status changes to Completed. The subprocess, which appears as a fold in this accordion display, shows a Completed status. Because it’s a subprocess, you can restart it multiple times.


Click on the record’s gear icon to find the restart option in the pull-down menu.


So now that we’ve created our subprocesses, 2 questions arise:

  • Should we allow users to update inspections that aren’t complete? If you want to, then go for it. But, if you only want to allow updates to inspections that are complete, we need to tell Pulpstream to restrict that user behavior.
  • Right now, the subprocess appears as a list in the detail view of a record. This is usually more suited for processes that take a long time to complete, such as fraud investigations.  For short operations, it may be better for your users to show this subprocess as an action button.

Let's make that happen. Go back to the Stream Definition canvas and open the Update Inspection subprocess. (Find it in the pull-down menu that displays the stream that’s in focus.)

Back on the canvas, double click on the first step in the stream. (That’s the Start Process form.)In the popup menu named Process Properties, you have a few options. You can check the Display As Action box, to show the subprocess as a button. In the Allow to Start pull-down menu you can specify when someone can use this subprocess.  Let's make that “Only after record status is complete.” The Can be started by pull-down menu is blank. This means that right now anybody can use this subprocess. Lets restrict it to only the original person who submitted the inspection. Select “Submitter.”


Save your changes. Save the process.

Now if you go back to Your Records and access the Submitted by You tab, you’ll notice that the subprocess is NOT shown in the records that are in process.

If you look at records that have been completed, which are on the Completed tab, you will see the subprocess represented as a button called “Update Inspection.”


Note: If you are logged in as a user that is not the submitter of this record, that button wouldn’t be visible to you.

And that’s it, you’ve learned how to harness the power of a subprocess.  At the next Skill Station, we will learn how to create a report with inspection data.