Saving a Comment to a Process Folder
  • 05 Apr 2022
  • 3 Minutes to read
  • Dark
    Light

Saving a Comment to a Process Folder

  • Dark
    Light

Article Summary

Overview

Process Folders are one of the core functions of maintaining audits trails for state driven processes. What makes them so useful is they keep track of a Folder's state, and any user comments within them. This document will cover the avenues of adding comments to Process Folders. Users can add a comment to a newly created Process Folder through a Flow, or retrieve a pre-existing Process Folder and add a comment to that record. 

There are two 'Add Comment' steps that will be demonstrated:

  • Add Comment, located in the Process category, or it can be searched for in the step Toolbox search bar 
  • Add Comment, located in Integration -> Internal Services -> Comment

The step located under the Process category is used for adding comments to newly created Process Folders. It only has 2 String inputs, one for the Name, and other for the comment itself. The Add Comment step located in Internal Services also has two input variables, labeled Entityid and Comment. This step can be used to add a comment to a new Process Folder, or one that already exists.


Adding a Comment to a Process Folder

  1. Navigate to a Designer Project folder. Right-click the folder and select Create Folder.
  2. Under CREATE FOLDER, create and name a new Folder. This will be used to store the created Process Folder for both examples.
  3. In the Designer Project folder, create a new Flow.
  4. In the Flow Designer, click the Done path on the Start step. Navigate to All Steps [Catalog] > Process and select the Setup Process Folder step. Click ADD.
  5. On the Properties panel, click PICK under the Parent Folder field
  6. Select Process Folder Data and click PICK.
  7. On the Properties panel, enter Constant values for Folder Description and Folder Name.
  8. Click the Done path and navigate to All Steps [Catalog] > Process. Select the Add Comment step and click ADD. This Add Comment step is meant to be used after the Setup Process Folder step. The Add Comment step must be used in tandem with the Setup Process Folder step.
  9. On the Properties panel under the INPUTS category, enter "This is a comment" for the Comment field and "Comment 1" in the Name field. Connect the Done path to the End step.
  10. Click Save to save changes. Click Debug on the top action bar, then click START DEBUGGING to create a record in the Process Data Folder.
  11. Navigate to the Process Folder Data and click on the newly created Process Folder.
  12. The PROCESS VIEW page will display the created comment.

Using Internal Services -> Add Comment Step

This example will use the Add Comment step from the Internal Services category to add another comment to the previously created Process Folder.

  1. In the Designer Project folder, create a new Flow.
  2. Click the Done path of the Start step. Select the Fetch Entities step and click ADD.
  3. On the Properties panel, enter "folder" in the Type Name field under the ENTITY FETCH DEFINITION category and select Folder [DecisionsFramework...]. Set the Parent Folder Id to a constant and pick the Process Folder Data folder.
  4. Click the Results outcome path. Navigate to Integration > All Integrations > Internal Services > Comment and select the Add Comment step. Click ADD.
  5. Under the INPUTS category, click Unknown next to the entityid field and select Select From Flow. Click EntityResults, select First, and select Folder ID. Click DONE.
  6. For the comment field, set the mapping from Unknown to Build Data. 
  7. Scroll down and configure the Comment Name and Comment Description fields with constant string values. The Comment Name is the field which stores the title of the comment. The Comment Description, stores the comment text. Declare constant string values for those inputs.
  8. Connect the Done path of the Add Comment step and the No Results path of the Fetch Entities step to the End step. Click Save to save changes.
  9. Debug the Flow to have the comment created and applied to the Process Folder.

  10. Navigate back to the Process Folder Data and click on the Process Folder.
  11. On the PROCESS VIEW page, the second comment can be found underneath the first comment.



Was this article helpful?