HomeGuidesRecipesAPI
HomeGuidesAPILog In
Guides
These docs are for v12.0. Click to read the latest docs for v31.

Data Parse Action

The Data Parse Action has been developed to enable clients to extract value from a JSON or XML data.

Features

  • Extract value from JSON data

The Data Parse Action lets you extract relevant information from JSON data using JPath expressions.

  • Extract value from XML data

The Data Parse Action lets you extract relevant information from XML data using XPath expressions.

Installation Requirements

Before installing or upgrading this extension you must consider the following requirements:

  • You must have administrator/elevated permissions to the SmartIQ web server, including the ability to copy and replace files in the SmartIQ installation folder. This is usually c:\inetpub\wwwroot\<<productname>> however may vary from system to system.

  • You must have the following installation file: DataParseExtension.dll

Installing the Action

Use the instructions below to install the action. If you are upgrading the action from a previous version, refer to the section Upgrading the Action below.

Note that [<<productname>> Produce Path] refers to the installation path on the web server running SmartIQ, where the Produce site has been installed. By default this is c:\inetpub\wwwroot\<<productname>>\produce however path may vary from environment to environment. Equally, [<<productname>> Manage Path] refers to where the Manage site has been installed, and [<<productname>> Scheduler Path] refers to the where the SmartIQ Scheduler service has been installed.

  1. Copy the files listed above into the following folder on the web server:
    [<<productname>> Produce Path]\bin

  2. Using a text editor such as Notepad, open the following file:
    [<<productname>> Produce Path]\appsettings.json

  3. Locate the <Extensions> section of the appsettings.json file and add the following entries:

"DataParseExtension.DataParseAction, DataParseExtension"

Produce appsettings.json <Extensions> section should look like:

"Extensions": [
    "Intelledox.Extension.DatasourceBuiltin.OleDbDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.SqlServerDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.CsvDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.OdbcDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RSSDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.WebserviceDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.XmlDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.InfinitiDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.JsonDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RestDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.ActionBuiltin.FileAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.SQLServerAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.DownloadPageMessageAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.RedirectAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.EmailAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.PrintAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.UserAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.WebhookAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.RESTAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.OracleAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.PushNotificationAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.EscalationBuiltin.EmailEscalation, Intelledox.Extension.EscalationBuiltin",
    "Intelledox.Extension.EscalationBuiltin.ReassignmentEscalation, Intelledox.Extension.EscalationBuiltin",
    "Intelledox.Extension.EscalationBuiltin.PushNotificationEscalation, Intelledox.Extension.EscalationBuiltin",     
		"DataParseExtension.DataParseAction, DataParseExtension"
  ],
  1. Save and close the appsettings.json file.

  2. Using a web browser, navigate to the SmartIQ Produce application to allow the system to register the action.

The Data Parse Action should now be installed ready for configuration and usage.

Upgrading the Action

  1. Copy the files listed above into the following folders on the SmartIQ web server, overwriting the existing files:
    [<<productname>> Produce Path]\bin
  2. Using a web browser, navigate to the SmartIQ Produce application to allow the system to register the upgraded action.

Installation into SmartIQ Scheduler

If the target environment is using the SmartIQ Scheduler, it is best practice to always install actions and accelerators to this service at the same time as the installation in SmartIQ Produce application. If this is not installed to the SmartIQ Scheduler there may be errors if any projects are executed from the scheduler that refers to this action.

To install any action to the SmartIQ Scheduler, follow the instructions in this guide as they apply to SmartIQ Produce, except instead of [SmartIQ Produce Path] use [SmartIQ Scheduler Path], noting that there is no ‘bin’ folder in this path so all files should be copied into the root of this path. For example, consider the path:
c:\inetpub\wwwroot\<<productname>>\produce\bin

To install to the SmartIQ Scheduler, simply use this path:

c:\inetpub\wwwroot\<<productname>>\IntelledoxScheduler

Also, you must apply the same configuration changes as instructed for the Produce appsettings.json to the IntelledoxScheduler appsettings.json file.

Using the action in Design

Once you’ve added the Data Parse Action to your project, either on the Finish page or on a workflow transition, use the following table to configure any action attributes that you require.

Action Attributes

NameDescription
DataThe JSON or XML data.
PathEnter XPath to extract value from XML data or JPath to extract valude from JSON data.
File Format [json/xml]File format of the data. By default, this will be set to JSON.

📘

Note

With XML Data, if your XML have custom namespaces, you would need to use the local-name() function for the XPath to work.

e.g. /[local-name()='string']/[local-name()='NewDataSet']/[local-name()='Table'][1]/[local-name()='Country']

See this for more information regarding local-name() function.