Extensible Checks

Introduction

Extensible checks enable users to expand the available verification checks using a Cloud Function. For example, users may want to include address verification data as part of the check results.

Any additional check added can be viewed within the Process Instance details page where a full map of all checks performed by the Finalizer can be found.

This document will demonstrate how to configure a Cloud Function that initializes an extensible check, configure the Process Definition to include the Cloud Function and Simple Decider, and finally review the results within the Process Instance detail page.

Step One - Configure the Cloud Function

  1. Navigate to the Cloud Function page found on the left-side navigation bar of the Backoffice application.
  2. Click the 'New Cloud Function' button at the top of the Cloud Function page.
  3. A pop-up window will appear where a Cloud Function can be created from scratch or from a predefined template. In this example, a Cloud Function will be created from without a template.
  4. The example below demonstrates a generic implementation of an extensible check called newCheck .

Example:

Python
Copy

The example above demonstrates the basic structure when defining extensible checks within a Cloud Function.

  1. The _checks table containing all checks is stored in a new variable named checks.
  2. checks.update() will allow users to update the table of checks and define a new, JSON formatted map of check values.
  3. A new extensible check is defined called newCheck .
  4. Inside the newCheck is a check1 object. This object can be populated with an outcome and additional objects such as the exampleResult object.
  5. The outcome will define the status of the check that will be passed to the overall outcome of the Process Instance. Only the first outcome will be used for each object that is provided inside a check, and this value must be defined outside any other object .
  6. metaData can be used to define additional information about the check. This object is used for informational purposes and will not validate any outcomes contained within.

Example:

Python
Copy

In the example above, the outcome will be "PASS". The outcome contained within the metaData will be considered metaData and not an outcome object. The outcome contained within the nested key2 object comes after the outcome of key1. Only the first outcome will be read when calculating the overall outcome.

Alternatively, multiple objects can be defined within a check, each with their own outcome. In the example below, both key1 and key2 outcomes will be passed to the overall outcome. Note that key2 is not nested within key1.

Example:

Python
Copy

As _checks has been defined in the list of process variables (pvars), this variable will need to be defined inside the input parameters of the Cloud Function activity. This will be covered as part of step two.

Step Two - Create Process Definition

Once the details of the extensible checks have been defined inside the Cloud Function, a new Process Definition can be created that includes the new Cloud Function. This Process Definition will also require a Simple Decider activity to provide an overall outcome, including the extensible checks defined within the Cloud Function.

  1. In the Backoffice application, navigate to the Process Definitions page found in the left-side navigation bar.
  2. Create or edit an existing Process Definition. To create a new Process Definition, click the 'New Process Definition' button at the top of the Process Definitions page.
  3. The example in this document demonstrates a face and document capture flow that includes extensible checks and a Simple Decider.
  4. At the end of the Process Definition, after the 'Switch to Desktop' activity, add a new 'Execute Cloud Function' activity to the Process Designer and connect the activity to the 'Device switch' gateway.
  1. Click the 'Execute Cloud Function' activity to open the right-side contextual menu. Expand the input parameters menu and set the 'Function name' parameter to the Cloud Function containing the extensible check.

Expand the Process Variables input parameter and add the _checks variable to list of values.

  1. Add a Simple Decider activity to the Process Designer and connect it to the 'Execute Cloud Function' activity using a sequence arrow. This activity is required to calculate an overall outcome for the Process Instance. Finally, connect the Simple Decider activity to the 'Write Summary Report V2' activity.
  1. The overall outcome of the Process Instance can be configured from the Simple Decider input parameters.

Once the Process Definition has been configured, click the Save & Deploy or Save buttons to finalize the creation of the new Process Definition.

Step Three - Viewing Results

Extensible check results can be viewed from the Process Instance details page.

  1. Navigate to the Process Instances page found in the left-side navigation bar.
  2. From the table of Process Instances, select the individual Process Instance and click the magnifying glass to enter the detail page.
  3. Scroll down to find the list of checks executed as part of the Process Instance.

Results can also be found in the summary.json file that is provided in the exported Process Instance details.

  1. Navigate to the Process Instance details page.
  2. Click the export button found on the right-side of the Overview panel to export details of the Process Instance.

Details will be found under the processResults inside the summary.json file.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard