Difference between revisions of "JSON Node"

From PresenceWiki
Jump to: navigation, search
(Conditions Panel)
Line 59: Line 59:
 
==== Conditions Panel ====
 
==== Conditions Panel ====
  
This Panel allows you to restrict the resulting records according to conditions. This uses the standard [Rules] procedure of dragging and dropping columns / variables into a rules tree. As well as using variables and columns from your previous nodes, you can also use columns from the current json object to allow you to match up different parts of the document.
+
This Panel allows you to restrict the resulting records according to conditions. This uses the standard [[Rules]] procedure of dragging and dropping columns / variables into a rules tree. As well as using variables and columns from your previous nodes, you can also use columns from the current json object to allow you to match up different parts of the document.
  
 
http://www.international-presence.com/wikidocs/images/json_conditions_panel.png
 
http://www.international-presence.com/wikidocs/images/json_conditions_panel.png

Revision as of 08:44, 5 August 2014

The JSON node retrieves a document from the internet or a local file location and converts it into a Presence Data Table after applying rules.

For further information about JSON, please visit http://json.org

Example JSON Document and resulting Presence Data Table

Here is an example of an incoming JSON Document:

http://www.international-presence.com/wikidocs/images/json_doc.png

And here is the resulting (outgoing) Presence Data Table:

http://www.international-presence.com/wikidocs/images/json_table.png

Using JSON Nodes in your Task

To include a JSON Query Node in your task, simply drag the JSON node from the Task Elements Toolbox (under Data Access) into the Task Edit View.

http://www.international-presence.com/wikidocs/images/json_query_toolbox.png

Introduction Panel

You will then see the introduction panel where you can enter a name and a description for the node:

http://www.international-presence.com/wikidocs/images/json_intro_panel.png

Documents Panel

Click next to show the Documents Panel. This is where you specify a live and test document and select which resulting values you would like to include in your outgoing table:

http://www.international-presence.com/wikidocs/images/json_doc_panel.png

Live JSON Document

This is the location of the document that will be used when the JSON node runs as part of a Task, or during testing if no Test document has been specified.

Test JSON Document

This is the location of the document that will be used in the test environment. If not specified, the live document will be used.

JSON Response

Once the test document (or live document if there is no test document) has been configured, click the "Update" button to retrieve the file.

The JSON Response window shows the JSON document that was retrieved.

Derived Columns

This shows a list of Data Table columns, which are derived from the JSON keys and objects. Click the checkboxes next to the column names to have that value included in your outgoing Data Table. Click "Select All" to choose all available columns, or "Deselect All" to choose none.

Column Aliases

This panel allows you to override the default column names. Two lists are displayed, the full JSON Paths on the left and the derived column aliases on the right. Double click on an alias to change it, or select one and click "Set Selected" button below.

To revert to the default alias for the selected column click "Clear Selected". To revert all columns back to their defaults click "Clear All".

http://www.international-presence.com/wikidocs/images/json_columns_panel.png

Conditions Panel

This Panel allows you to restrict the resulting records according to conditions. This uses the standard Rules procedure of dragging and dropping columns / variables into a rules tree. As well as using variables and columns from your previous nodes, you can also use columns from the current json object to allow you to match up different parts of the document.

http://www.international-presence.com/wikidocs/images/json_conditions_panel.png

Test Panel

This panel inspects the document retrieved in the Documents Panel, converts it into a Presence Data Table, applies the rules specified in the Conditions Panel, then displays it. Note that the document will not be retrieved from the server or disk at this time. If you make changes to the document itself you must refresh it in the Documents Panel before running the test to see the changes.

Click the "Run Test" button to perform the test. To clear the current results table, click "Clear Results".

http://www.international-presence.com/wikidocs/images/json_test_panel.png


See Also

Task Elements : Data Accesss Task Elements : JSON Node

SQL Statement Nodes | Object Monitor Nodes | XML Query Nodes | Mail Scanner Nodes
Web Services Nodes | LDAP Query Nodes | JSON Node | Flat File Parser | Data Table Nodes | Variable Nodes
Transaction Control Nodes | Context XML Nodes


Task Elements | Resources