Activity designer parsing rule example

In this example, the parsing rule is configured to populate the activityOutput.ipv4 variable with the value for the IP address from a domain server, using PowerShell.

Before you begin

Role required: activity_creator, activity_admin

About this task

To generate the sample data, the administrator must actually run the command on the host and then paste the data returned into the Sample payload data field when creating the parsing rule. The administrator can then create an expression that returns IP addresses from that sample in two formats: ipv4 and ipv6. In this example, the system produces two expressions to use for the parsing rule.


  1. Navigate to Workflow > Workflow Editor and open the activity that runs on the host.
  2. Click the Inputs tab, and note the Command.
    Figure 1. Parsing rule PowerShell inputs command
    Parsing rule PowerShell inputs command
  3. In a PowerShell console, run the Command on the host to extract the XML sample that contains the values you need.
  4. Copy the data that is returned to the clipboard.
  5. In the activity designer, click the Outputs tab and paste the returned data into the Sample payload data field.

    In this example, the data includes IP addresses in two different formats and the domain name.

  6. Select the parsing type for the source. In this example, select XML.
    Parsing rule raw payload data
  7. Click Parse sample data.

    The system displays the XML in the proper format, and it becomes clickable. In this view, the system can translate clicked data from the sample into an expression.

    Parsing rule parsed payload data
  8. To create the expression, click the elements in the data sample you want to map to the variable.

    Based on the sample data you clicked, the system creates two expressions.

    Creating parsing rule expressions
  9. Select an expression from the list.

    The desired result is the IP address that has a type attribute of ipv4. The system populates the Expression field with this choice.

    Selecting a parsing rule expression
  10. Click Test expression.

    The system parses the payload using the selected expression and returns the requested data in the Parsing result field.

    Testing a parsing rule expression
  11. Click Submit.

    The view returns to the Outputs tab of the activity designer. The new parsing rule is listed, and a blank row is available for another rule.

    List of completed parsing rules