XML Activity

This activity lets you manage and modify the XML response, form a request, or retrieve data from the existing XML file. You can automate the common XML tasks such as merging, transforming, validating and signing XML documents.  It helps to read, edit, create or delete the XML nodes as well as extract XML fragments (collection of nodes).

Using XML Activity

  1. In the Canvas Tools pane, click Process Components to expand the tool and view the associated activities.
  2. Drag the XML Activity and drop to the Flowchart designer on the  Canvas.

 

  1. The instructions related to XML activity differs depending upon the supported request method selected in the XML Action list. Click the appropriate link to know the details:
  • Setter- Modifies or adds data into the XML node
  • Getter- Retrieves data from the XML input.
  • Push- Adds XML node or XML fragments into the provided XML input.

Setter

You can pass the XML input for processing the request in two different ways. Click any of the following link to know the details:

Pass data as  file - the data is passed as a XML file for the updates to be done.

Pass data manually - the data is passed manually in the editor available in Automation Studio for the updates to be done.

Passing Data as XML File

  1. In the XML Action list, select Setter.
  2. In the XML Input list, select the available parameter to pass the XML input file for processing. The input file gets stored in the selected parameter. You must define the parameter in the Parameter bar to use this option.
  3. Click the (Settings) icon, and then click Input Mapping. The Input Mapping dialog box opens where you can align the key-value pair with a parameter to set in the XML file input.

 

  1. Click Add. The fields and row appear where you can enter the relevant data.

 

  1. In the XPath field, enter the XML path expression for selecting the nodes from the XML data file where you want to set the key:value pair.
  2. In the Key field, enter the key that you want to insert in the XML data file.
  3. In the XML Data Type list, select the data type of the value. Available options are:
  • ELEMENTADD -  creates a new XML tag with the intended value provided for the key at the required xpath.
  • INNERELEMENT- adds the value inside the mapping parameter at the given xpath. For this data type, key is not considered.
  • ATTRIBUTE- adds the provided key as attribute and its value at the given xpath.

 

  1. In the Mapping Variable list, select the parameter whose value you want to map with the key. You must define the parameter in the Parameter bar to use this option.
  2. Click CONFIRM to save the input mapping configuration. You are directed back to the XML activity in the Canvas.
  3. In the Output list, select the available parameter to store the output of this action. You must define the parameter in the Parameter bar to use this option.

Passing Data Manually

  1. In the XML Action list, select Setter
  2. Select the check box beside XML Input field to provide the XML data manually.
  3. Click the (Settings) icon, and then click Input XML Editor. The  XML Input Editor dialog box appears where you can enter the XML file data manually.

 

  1. Enter the data in XML format and then click Confirm.

 

  1. Click the (Settings) icon, and then click Input Mapping to map the key-value pair with a parameter to set in the XML input.  The Input Mapping dialog box appears.

 

  1. Click Add to provide details related to the mapping of input parameters. This lets you add the key of the key-value pair of the XML input.
  2. In the XPath field, enter the XML path expression for selecting the nodes from the XML data file where you want to set the key:value pair.
  3. In the Key field, enter the key that you want to insert in the XML data.
  4. In the XML Data Type list, select the data type of the value. Available options are:
  • ELEMENTADD -  creates a new XML tag with the intended value provided for the key at the required xpath.
  • INNERELEMENT- adds the value inside the mapping parameter at the given xpath. For this data type, key is not considered.
  • ATTRIBUTE- adds the provided key as attribute and its value at the given xpath.
  1. In the Mapping Variable list, select the parameter whose value you want to map with the key.
  2. Click CONFIRM to save the input mapping configuration. You are directed back to the XML activity in the Canvas.
  3. In the Output list, select the available parameter to store the output of this action. You must define the parameter in the Parameter bar to use this option.

    The  key-value data is set in the XML input.

 

Getter

You can pass the XML input for processing the request in two different ways. Click any of the link to know the details:

Passing Data as XML File

  1. In the XML Action list, select Getter.
  2. In the XML Input list, select the available parameter to pass the XML input file. The file gets stored in the selected parameter. You must define the parameter in the Parameter bar to use this option.
  3. Click the (Settings) icon, and then click Output Mapping to assign the fetched data to a parameter for further processing. The Output Mapping dialog box opens.

  4. Click Add to provide details related to the mapping of output parameters. This lets you provide the path to retrieve the data.
  5. In the XPath field, enter the XML path expression for selecting the nodes from the XML data file from where you want to retrieve the data.

  6. In the Mapping Variable list, select the parameter to map with the retrieved data . You must define the parameter in the Parameter bar to use this option.
  7. Click CONFIRM to save the output mapping configuration.

Passing Data Manually

  1. In the XML Action list, select Getter
  2. Select the check box beside XML Input field to provide the input manually.
  3. Click the (Settings) icon, and then click Input XML Editor to enter the XML file data manually. The XML Input Editor dialog box appears.

 

  1. Enter the input data in XML format, and then click Confirm. You are directed back to the XML activity in the Canvas.

  2. Click the (Settings) icon, and then click Output Mapping to map the XML path and the data fetched with a parameter. The Output Mapping dialog box opens.

  3. Click Add to provide details related to the mapping of the output parameters.
  4. In the XPath field, enter the XML path expression for selecting the nodes from the XML data file from where you want to retrieve data.
  5. In the Mapping Variable list, select the parameter to map with data retrieved. You must define the parameter in the Parameter bar to use this option.
  6. Click CONFIRM to save the output mapping configuration.
    The data is retrieved from the provided XML input.

 

Push

You can pass the XML input for processing the request in two different ways. Click any of the link to know the details:

Passing Data as XML File

  1. In the XML Action list, select Push.
  2. In the XML Input list, select the available parameter to pass the XML input file. The file gets stored in the selected parameter. You must define the parameter in the Parameter bar to use this option.
  3. Click the (Settings) icon, and then click Input Mapping.  The Input Mapping dialog box appears where you can map the value you want to modify at the stated path.

  4. Click Add. The fields row appears where you can to enter the relevant data.

  5. In the XPath field, enter the XML path expression  where you want to modify the data.
  6. In the Mapping Variable list, select the parameter to align the value you want to modify at the stated path of the XML input. You must define the parameter in the Parameter bar to use this option.
  7. Click CONFIRM to save the input mapping configuration. You are directed back to the XML activity in the Canvas.
  8. In the Output list, select the available parameter to store the output. You must define parameter in the Parameter bar to use this option.

Passing Data Manually

  1. In the XML Action list, select Push
  2. Select the check box beside XML Input field to provide the XML input as default value.
  3. Click the (Settings) icon, and then click Input XML Editor to enter the XML input  manually. The Input XML Editor dialog box appears.

  4. Enter the data in XML format and then click Confirm. You are directed back to the XML activity in the Canvas.

  5. Click the (Settings) icon, and then click Input Mapping to align the value you want to modify in the stated path of XML input. The Input Mapping dialog box appears.

  6. Click Add to provide details related to the mapping of input parameters.
  7. In the XPath field, enter the XML path expression where you want to modify the value.
  8. In the Mapping Variable list, select the parameter whose value you want to map. You must define the parameter in the Parameter bar to use this option.
  9. Click CONFIRM to save the input mapping configurations. You are directed back to the XML activity in the Canvas.
  10. In the Output list, select the available parameter to store the output. You must define the parameter in the Parameter bar to use this option.
    The  data is added at the stated xpath of the XML input.

 

XML Activity Properties

The properties of a XML 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 XML Activity. You can change the name as required.