Activate and build data collectors
Activate and build data collectors to add to a policy.
Before you begin
Role required: sn_pace.code_editor
Procedure
- Select the Versions tab, then the data collector draft name.
- Select the Build tab.
-
In the Data sources section, select the variable tab you want to define.
- Click Add.
- On the Add new input form, fill in the fields.
Table 1. 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. Note: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.
- Optional:
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.
Note:When the data collector has been activated, you will be unable to make changes to the inputs or outputs.