How To Create Workflows

Overview

Workflows allow business analysts to create basic trigger and action pairs based on simple events in the system without having to heavily involve a BillingPlatform developer to program these triggers and actions on the back-end.

There are different events and actions supported by the platform that will allow flexible and complex rules to be written.

Procedures

1. Navigate to the Workflows setup section

Go to Setup > Develop > Workflow. This will display the list of workflows defined in the system. If only one workflow is defined, the details will be displayed immediately.

2. Create a new workflow or open an existing workflow for editing.

Depending on the task that needs to be done, you can either click New to create a new workflow or click the Edit link beside an existing workflow to edit an existing one. To simply open the workflow details for viewing only, click an existing workflow.

At this point, the workflow details wizard is created (for new workflows) or the details page (for editing or viewing existing workflows).

3. Enter the entity that the workflow rule will be evaluated against, and then click Next.

4. In the Details entry page, enter the necessary information and click Save to complete the workflow rule.

Field Definitions

Table 1
Field Definition
Name Unique name of the workflow.
Description Summary/description of what the workflow does.
Status Specifies whether the workflow rule is evaluated or not. ACTIVE means that the workflow rule is evaluated while DEACTIVATED skips the workflow rule from being evaluated.
Order of Evaluation

Integer that indicates the order of evaluation of the workflow. This is useful when defining multiple workflows against a single entity that need to run in a specific order.

For workflows that have the same order value, the alphabetical order of the Name in ascending order will be used.

Event Type

Specifies when the rule is evaluated based on activities against the entity. Available options are:

  • After Create - Workflow is evaluated whenever a record is created in the entity.
  • After Create and After Update - Workflow is evaluated whenever a record is created in the entity or saved when making updates.
  • After Create and After Update(with criteria met and changed) - Workflow is evaluated when a record is created and when the criteria changes from not being met to being met.

To illustrate this:

  1. Workflow is created to evaluate that a text field named FieldA = "Run Me".
  2. A record is created with FieldA = "Run Me".
  3. Upon saving, the workflow rule is evaluated and since the criteria is satisfied, the workflow actions will be executed.
  4. The same record is opened for editing and another field is updated. FieldA was not changed from it's previous value of "Run Me". Once this record is saved, the workflow rule is not evaluated.
  5. The same record is opened for editing and FieldA is changed to "Check Me". Upon saving, the workflow rule is evaluated but since the critiera is met, the workflow actions are NOT exeucted.
  6. The same record is opened for editing and FieldA is changed back to "Run Me". Upo saving, the workflow rule is evaluated and since the criteria is now satisfied again, the workflow actions will be executed.
  • Before Delete - Workflow is evaluated when a record is deleted from the entity. This is only applicable for entities that have the Recycle Bin enabled, making the record deletion feature available.
  • After Restore - Workflow is evaluated when a record is restored from the recycle bin.
  • Scheduled - The workflow runs during the interval that is specified in the scheduling parameters.

Note: Care needs to be taken when selecting the event type as this may cause unnecessary computing strain on the app if the proper event is not selected.

Frequency

Applicable only if the Event Type is set to Scheduled. This specifies how often the workflow rule is evaluated.

Start Time

Specifies the date and time when the workflow will be initially evaluated. After that, the workflow will be evaluated based on the interval specified in the Frequency field.

Rule Action Criteria

Specifies the manner of authoring the criteria for the workflow. The following options are available:

  • Critieria Met - The simplest way of defining the criteria. This allows you to select fields and use basic comparison operators, and then group them to be able to use the AND, OR, and other basic operators.
  • Formula Evaluates To True - This allows for more complicated criterias to be authored. This is used when additional manipulations such as obtaining components from the system date/time is needed. This opens up the ability to create complicated rules and field manipulation functions.
Criteria Met

Basic table containing Field - Operator/Condition - Value combinations to evaluate whether the criteria is met or not. This is only applicable if the Rule Action Criteria field is set to Criteria Met. Multiple criteria can be created if more than one field needs to be evaluated.

Column Definition
Field Click + to expand the list of available fields that can be evaluated.
Condition Pulldown containing the conditions that can be used to compare the field value.
Value Enter the expression/text/value that needs to be satisfied with the Field and Condition parameters.
Criteria Join Logic

Applicable when the Criteria Met option is used for the Rule Action Criteria. Starting from the first row in the Criteria Met table as row 1, 2, and so on, string a logical statement such as:

1 and 2 or (3 and 4)

Logical operators can be used here.

Formula

This is only applicable if the Rule Action Criteria field is set to Formula Evaluates To True. This allows for the authoring of complex formulas such as case statements, nested if/else, and other functions. Basic programming knowledge is needed to understand the syntax of the formula.

The Insert Field, Insert Operator and Insert Function can be clicked to open a pop-up where you can select the fields, operators and functions that are available relative to the entity in which the workflow is defined and make authoring the formula easier.

On Failure

Indicates the action to be done when the workflow or any of its actions fail for whatever reason. Available options are:

  • Rollback - The actions performed in the workflow will be rolled back. It will be as though the workflow did not run.
  • Raise Alert - An Alert message will be generated and sent to the alert processing routines of the platform. This can then be subscribed to in the same manner as subscribing to other alerts.

5. Save the new workflow/changes.

Click the Save button to submit the workflow to the system.

Next Steps

Related Topics

Have more questions? Submit a request

Comments

Powered by Zendesk