Notifications

3941 views

Simple approvals in workflow

 

Goals
  • Creating approvals with workflow
  • Single approvers

 

ServiceNow approval workflow

ServiceNow Workflow provides three activities to assign and manage approvals: Approval - User, Approval – Group, and Approval Coordinator.

The approvals created in workflows interface with the ServiceNow Platform Approval Engine.

The Workflow Engine creates the approvals and then waits for an Approval or Rejection to transition forward.

The interaction between the approval records created by workflow and the tasks being approved or rejected are not part of workflow. They are a part of the Approval Engine. Workflow only creates approvals and reacts to the approval state.

  

Creating the Knowledge simple approval workflow

1. In the Application Navigator filter text, type workflow to find the Workflow application menu.

2. Select the Workflow Editor module. The Workflow Editor always opens in an adjacent browser tab.

3. Click the New button.

4. Fill out the form as shown

    Name: Knowledge Simple Approval

    Table: Global [global]

5. Click the Submit button.

6. In the Activity Tree, expand the Approvals category folder.

    The open Approvals folder should look like this:

These are the global Approval-related Activities available in the Workflow Engine.

  • Approval – User

o   Creates a single User Approval record in the database.

  • Approval Action

o   Updates the current record associated with the workflow with an Approved or Rejected value in the Approval field of the Glide record, if the field exists.

  • Rollback To

o   Provides a way to restart portions of a Workflow. If there are Approvals in the restarted portion of the Workflow, the Approval states will be rolled back to Not Yet Requested or Requested depending on the configuration of the Rollback To path.

7. Find the Approval – User Activity in the Approvals folder.

8. Hold the mouse down and drag the Activity onto the canvas. Hover the activity over the Transition Line until the line turns blue.

9.  Let go of the mouse.

NOTE: In subsequent labs, these steps will be abbreviated to Drag Activity onto the transition.

 

10. Fill out the form as shown:

      Name: Approval One

11. Select the Users Lock icon.

 

12. Select the Search looking glass icon.

13. Select K14-Approver One as the approver.

NOTE: In subsequent labs, these steps will be abbreviated to User Search icon > User Name. 

14. Click the Submit button.

Your workflow should look like this:

 


Add the log message activities

1. In the Activity Tree, expand the Utilities folder and locate the Log Message Activity.

2. Drag Log Message onto the transition between the Approved condition and the End Activity.

3. Fill out the form as shown:

    Name: Approved

    Message: Approval One was approved.

4. Click the Submit button.

Your workflow should look like this:

 

NOTE: You may have to click and drag the Activities on the canvas to spread them out.

5. Find the Log Message Activity in the Utilities Category Folder in the Activities Tree on the right.

6. Single-click the Log Message Activity onto the Canvas.

7. Fill out the form as shown

    Name: Rejected.

    Message: Approval One was rejected.

8. Click the Submit button.

 

NOTE: The Log Message Activity is placed on top of the existing Log Message Activity. Move it off and onto another area of the Workflow Canvas.

 

9. Select the Rejected node on the Approval – User Activity and draw a transition to the Log Message Activity.

10. Select the Always node on the Rejected Log Message Activity and draw a transition to the End Activity. Review your work in the next screen capture.

11. Select the green Play button.

 

 

12. Select Submit.

Your workflow should look like this:

 
The green state of the Approval One Activity indicates that the workflow is waiting for the approver to act on the approval.

 

13. Return to the main ServiceNow tab.

14.  Self-Service > My Approvals.

15.  Clear the breadcrumb to display ALL approvals.

16.  In the list view, find the K14-Approver One record and right-click the State field. Change the State to Approved.

 

 

NOTE: In subsequent labs, these steps will be abbreviated to approve the record from the list State field.

 

17. Return to the Workflow Editor in the right tab.

18. Use the Refresh icon to refresh the Workflow Editor. It is located in the banner next to the Help icon.

 

 

 

 

19. Click the Refresh icon in the Workflow Context view.

Your workflow should look like this:

20. Close the Workflow Context diagram by selecting the X in the upper right hand corner. 

Article Information

Last Updated:2016-03-10 12:33:57
Published:2014-05-19