Create a data collector for a policy version
Create a data collector for a policy version in the Define Variables section of the Policy Builder.
Antes de Iniciar
Role required: maintsn_pace.code_editor
Procedimento
O que Fazer Depois
- Activate and build data collectors
- Test a data collector for a policy version
- Add data collectors to a policy version
Activate and build your data collector to add it in the policy builder.
- Select the Versions tab, then the data collector draft name.
- Select the Build tab.
- In the Data sourcesDefine Variables section, select the variable tab you want to define.
- Click Add.
- On the Add new input form, fill in the fields.
Tabela 2. Add new input Field Description Label (Optional) Label of the input or output. Name Enter a name of the input or output. Type Select the type of the input or output. Mandatory Select this check box if the input is mandatory. Description Description of the input or output. Default value Specify a default value. Nota:Inputs are used as parameters that help collect the correct data to be used in the policy. Outputs are used to specify output variables that can be used in the policy logic. - Click Save.
- Repeat the steps to create the inputs and outputs as needed.
- Click Add.
- Enter your inputs or outputs and write your code in the Data collector script, as needed.
- Add an exception error in your data collector by entering the following script: throw new PaCEExecutionError.
When you execute the policy with the data collector exception, the error message will appear under the Output tab in the Execution errors section.
- Click Save.
- When you're finished, select Publish.
- In the Publish draft window, select the Activate this data collector check box, then Publish.
Add your data collectors in the Policy Builderinto the Policy Builder from the Data Collectors tab.
- In the Policy Builder tab, select the version of the policy you want to add the new data collector to, then the Data sources icon
.
- Navigate to the policy you want to add the data collector to, then under the Define Variables section, click New.
- Select the data collector from the list of possible data collectors in the system, then click Next.
- In the Add data collector page in the Details tab, give the data collector a label and variable name.Nota:If you're using the same data collector multiple times, it should have a different variable name.
- In the Inputs tab, provide inputs to complete the configuration of the data collector. The input can be user-specified or selected from the data picker icon.
- When you're finished, click Save. After the data collector is added and configured, you can access the data collector in the script editor using the data picker in low-code.