Regex Validator

This activity allows you to validate the data that forms the input parameter in a process. It validates the required format of the data and helps in minimizing the errors, if any, during execution of the process.

 

The value stored corresponding to each variable is validated based on the type of  regex validator configured. If the validation fails, configure the process to take the necessary actions.

 

By default, the Regex Validator activity supports e-mail and phone number (mobile numbers of India) validation. You can add more validations as per your business need by editing the RegexValidator.xml file. Follow the below steps to configure the validations other than default validations:

 

To configure a regex validation:

  1. In the, client-tools > Automation Studio > ProtonFiles folder, locate RegexValidator.xml file.
  2. Open RegexValidaotr.xml file and update the details regarding the regex to  set new validations.

 

 

  1. Save the .xml file.
    The new regex validation is configured.

Using Regex Validator Activity

  1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities.
  2. Drag the Regex Validator activity and drop inside the Application activity.

 

 

  1. Click the (Settings) icon, to set the validator mapping. The Regex Validator Mapping dialog box appears.

 

 

  1. Click Add to map the parameter with the required regex validator type.
  2. In the Arguments/Variables drop down list, select the parameter. You must define the parameter in the Parameter bar use this option.
  3. From the Validator Type drop down list, select the validation you want to configure against the selected parameter. By default, EmailID and PhoneNumber is available.
  4. Click CONFIRM.
  5. You can click DELETE if you want to delete the mapping.
  6. In the Output Mapping list, select a parameter to store the status of the Regex Validator activity operation.  to use this option, a parameter of type Boolean must be pre-defined in the Parameter bar.
    The Regex Validator activity is created to perform the validation.

Regex Validator Properties

The properties of a Regex Validator activity are listed in the following table and can be edited in the Properties grid on the right panel.

 

Property Name

Usage

Control Execution

Ignore Error

When this option is set to Yes, the application ignores any error while executing the activity.

If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception.

By default, this option is set to No.

Delay

Wait After

Specify the time delay that must occur after the activity is executed. The value must be in milliseconds.

Wait Before

Specify the time delay that must occur before the activity is executed. The value must be in milliseconds.

Misc

Breakpoint

Select this option to mark this activity as the pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected.

In large or complex processes, breakpoints help in identifying the error, if any.

Commented

Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution.

DisplayName

The display name of the activity in the flowchart designer. By default, the name is set as Regex Validator. You can change the name as required.

RegexOutputParam

The parameter configured to store the status of the Ragex Validator activity.