What's New

Workflow Rule

By - Jun 01, 2018

The Workflow Rule allows you to run SQL statements upon workflow action, such as Post, Approve, Reject, etc.

Use Case

In this example, we have an advanced workflow configured for Revenue Planning. We would like to archive Forecast data when an approver clicks “Approve” on the dashboard Action menu.

 

Add Workflow Rule

1. Navigate to the MODELER module.

Note: To use this feature, you need to upgrade to the latest Kepion, version 6.0.18150 or later.

2. Click Application -> All Workflow Rules.

3. Click Add.

4. Give the rule a name, and click OK.

You now have an empty rule that you can begin to configure.

Configuration

1. Click Edit to get started.

2. Enter SQL script in the rule window.

3. Click Save to confirm you change.

The key is to use the system parameter @ActivityID, and the system table [dbo].[Activities] and [dbo].[Constants].

  • @ActivityID: System parameter of type INT that you can use directly without declaration.
  • [dbo].[Activities]: System table that tracks user interaction with a workflow, e.g. SubmissionType, SubmissionID, UserID, Timestamp, etc.
  • [dbo].[Constants]: System table that lists out the possible options for SubmissionType, and options for other objects.
  • [dbo].[Authorizations]: System table that lists out configuration details about a workflow, including Dashboard and Workbook.

 

Now you’ve completed configuration for a workflow rule.

 

Other Use Cases

There is a lot more you can do to use this feature. Workflow Rule can be triggered by the following Action:

  • Approve
  • Discard
  • Post
  • Recall
  • Reject
  • Save
  • Submit

SQL scripts to help explore the system tables:

 


Facebooktwitterlinkedinmail