Workflows: Approve vs Deny vs Reject

PurchaseApprovalWhile working with customers, I’ve recently noticed that a lot of approval steps in a workflow have three possible outcomes. Consider a Purchase Requisition workflow where an Employee wants to buy something and it goes to his/her Manager for approval. If approved, the next step is Purchasing.

What actions could the Manager take?

  1. He could Approve in which case the workflow moves forward to Purchasing.
  2. He could Reject back to the employee asking for more information in which case it moves backward to the Employee.
  3. Or, he could Deny the request completely (Reject to discard) in which case the workflow should move forward, skip the Purchasing step and terminate.

With frevvo, the Approve case is trivial. It’s the default behavior. Reject back to the Employee is also straightforward. It’s built-in to frevvo and can be configured for any step.

Deny (Reject to discard) is also easy but not so obvious. We’re considering adding this as a built-in feature but you can do this today by taking a few steps.

Step 1. Create an approval section with a Radio button

RequestStatus

The radio has two options: Approve or Deny. Deny is the second (last) option and the Comment property is checked. If the Manager clicks Deny, a text box will show up below the radio asking for details. Note the Name (set to RequestStatus) and Options (values are Approve and Deny) properties of the Radio control. You can also set the control to invisible and create a rule to show/hide it in the appropriate flow step (Manager in this case). For example:

if (form.load) {
var an = _data.getParameter(‘flow.activity.name’);
RequestStatus.visible = (an !== “Employee”);
RequestStatus.enabled = (an === “Manager”);
}

Step 2. Set Preconditions

PreconditionIn the Flow Designer, select the Purchasing step. Set the precondition as shown in the image to:

RequestStatus.value === “Approve”

This will evaluate to true only if the Manager selected Approve in the Radio we created earlier. If it’s false (Manager selected Deny), the Purchasing step will be skipped and the workflow will terminate.

Step 3. Setup Reject

SetupRejectIn the Flow Designer, select the Manager step and then click the Setup Approval/Rejection link in the Properties panel.

In the wizard that shows up, you can check Reject from here, Reject to here, change the label of the Reject button itself and customize the subject/body of the notification email.

Repeat this step for any other step from which you wish to Reject.

That’s it. Now, the Manager can:

  1. Select Approve in the Radio and continue the workflow. It will move to Purchasing.
  2. Select Deny in the Radio, provide a reason and continue the workflow. It will skip Purchasing and terminate.
  3. Click the Reject button and send the workflow backwards to the Employee for more information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: