- 03 Nov 2020
- 2 Minutes to read
- Print
- DarkLight
Serialization
- Updated on 03 Nov 2020
- 2 Minutes to read
- Print
- DarkLight
Overview
The process of changing an object into a store-able format is called serialization. There are steps in the Flow Designer that gives users the ability to change data types into store-able, serialized formats. Reasons a user would want to serialize data types would be for API calls or scenarios where system to system integration is needed. The main serialized formats that can be utilized are JSON, XML, and XSD structures, and the Flow Designer contains Serialization steps for those formats.
Json Serialize Step
Setting Category | Name | Explanation |
Parameter | Type | The type of data that will be serialized that can be a User Defined type or a default Decisions type |
Parameter | Ignore Null | Ignores all null values in a JSON object |
Input | Object To Serialize | The input variable, expecting an object from the user select type |
Output | JsonSerialize1_Output | The default variable that stores the Json serialized type |
Output | Error Message | Output variable for the step error message |
XML Serialize Step
Setting Category | Name | Explanation |
Options | Readable XML Output | Word wraps the output of the step to make it easy to read |
Options | Treat Null String Like Empty String | Changes null strings values into empty string values |
Options | Output Encoding | Support Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32 |
Options | Include BOM in Output | Adds a Byte Order Mark to the serialized output |
Parameter | Type | The type of data that will be serialized that can be a User Defined type or a default Decisions type |
Input | Object To Serialize | The input variable, expecting an object from the user select type |
Output | XmlSerialize1_Output | The default variable that stores the XML serialized type |
Output | Error Message | Output variable for the step error message |
XSD Serialize Step
Setting Category | Name | Explanation |
Options | Readable XML Output | Word wraps the output of the step to make it easy to read |
Options | Treat Null String Like Empty String | Changes null strings values into empty string values |
Options | Output Encoding | Support Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32 |
Options | Include BOM in Output | Adds a Byte Order Mark to the serialized output |
Parameter | Type | The type of data that will be serialized that can be a User Defined type or a default Decisions type |
Input | Object To Serialize | The input variable, expecting an object from the user select type |
Output | XSDSerialize1_Output | The default variable that stores the XSD serialized type |
Output | Error Message | Output variable for the step error message |
Example
To utilize these steps, open the Flow Designer and drag the 'Fetch Entities' and 'Json Serialize' step. On both steps, set them to expect the default Decisions 'Account' type. Map the first or last value into the input of the 'Json Serialize' step.
Debug the flow to see output of the serialize step has changed the type into a JSON serialized string.
To create an example with XML and XSD merely delete the Json step and add the 'Xml Serialize' or the 'XSD serialize'. On this example, click on the 'Readable XML Output', and configure the inputs like the image below.
Debug the flow and view the output of the XML serialize step to see the XML serialized string.