How to: Create a simple management approval workflow

In this article I want to show you how to enable content approval for enrollments in the Employee Training Management or the Event Management.

This is what I require:

  1. Content approval is required individually for each event. This means I can decide if content approval is required for an event.
  2. If approval is required and a user registers, an e-mail is sent to members of a SharePoint Group – the approvers – with a link to the approval page.
  3. On approval the enrolled user should receive an e-mail invitation

In this example I just want to send an e-mail to a specific group of people, the approvers. If you want to send an e-mail to the user’s manager, you can use the Lookup Manager of a User workflow action or create an additional list, containing the employee/manager relation where you can look it up.

1. Create a new Yes/No column called “Approval required”

To identify if an event requires approval, I created a new Yes/No column called “Approval required” in the “Scheduled Events” list.

Create a new Yes/No column

2. Enable content approval in the enrollment list

Open the enrollment list’s list settings, click on versioning settings and activate content approval.

Enable content approval

If content approval is activated in the enrollment list and a user enrolls, the enrollment stays pending until it is approved. Once approved, the invitation e-mail is sent to the user.

3. Create a SharePoint Designer workflow in the enrollment list

Open the enrollment list in SharePoint designer…

Open the enrollment list in SharePoint designer

…and create a new workflow.

New workflow

Create an impersonation step to ensure the permissions are sufficient.

Impersonation step

A SharePoint designer workflow always runs under the permissions of the user who started the workflow. Since the user may not have permission to approve the enrollment, I used the impersonation step to run this section under the identity of the person who authored the workflow rather than the workflow’s initiator.

In the impersonation step I need the following ‘if any value equals value’ condition:

Condition

The value I’m looking for is in the Scheduled Events list and the field is “Approval required”.

Approval required

To find the correct item I matched the ID of the event with the ID of the event lookup in the enrollment (Current Item)

Event lookup

In the Employee Training Management this field is called “Training Event” instead of “Event”.

This is what it should look like:

Workflow lookup

And this value should be equal to “Yes”.

value equals Yes

So if “Approval required” is equal to “Yes” I want to send an e-mail.

Send email

Lookup user

User or group

I previously created a SharePoint group, the Approvers. The members of this group should receive the e-mail.

Approvers

In my case the e-mail looks like this:

E-Mail

The important part is the link.

Link1

Link2

This is the link to the approval page for the enrollment. To get the correct list ID I opened the enrollment list’s list settings and copied the GUID from the address bar.

Link

Now let’s move to the “Else” section. If approval is not required, I just want to approve the enrollment automatically. To do this I used the “Set Content Approval Status” action.

Approve

OK. Now let’s make sure the workflow starts when an item is created.

Start on creation

Finally let’s publish the workflow.

Publish

4. Make sure the approvers have sufficient permissions

In the list settings of the enrollment list I clicked on “Permissions for this list” and “Stop Inheriting Permissions”.

Stop permission inheritance

The next step is to grant permissions to the approvers.

Grant permissions

to approvers

In this example I assign them the Design permission level. If you want to assign more accurate permissions, you can also create your own permission level.

OK, that should be it. Let’s test it.

5. Tests

To test everything, I created two events, one that requires content approval and one that doesn’t.

If I enroll in the event that requires content approval, I immediately receive the e-mail that I configured in the workflow.

Approval mail

The link opens the following page:

Approval page

If I approve the enrollment, the user immediately receives the invitation to the event.

Approval page

The second test is to enroll in an event that does not require approval. In this case the user receives the invitation immediately after registering.

I hope you found it useful, it’s a very simple workflow that basically just sends an email with a link to the approval page. Of course you can also use the Approval process action instead. This also creates and assigns task to the approvers.

If you have problems configuring the workflow or any other questions, please send an e-mail to support@sapiens.at or post a comment.