Serialization
- 09 Mar 2021
- 2 Minutes to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Serialization
- Updated on 09 Mar 2021
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Serialization is the process of changing an object into a storable format. The Flow Designer provides steps that give users the ability to change Data Types into storable serialized formats. One use case for doing this would be a user who would want to serialize Data Types for API calls or scenarios where a system-to-system integration is needed. The main serialized formats 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 | Type of data that will be serialized (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-selected 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 | Supports Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32 |
Options | Include BOM in Output | Adds a Byte Order Mark to the serialized output |
Parameter | Type | Type of data that will be serialized (can be a User Defined type or a default Decisions type) |
Input | Object To Serialize | The input variable expecting an object from the user-selected 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 | Type of data that will be serialized (can be a User Defined type or a default Decisions type) |
Input | Object To Serialize | The input variable, expecting an object from the user-selected type |
Output | XSDSerialize1_Output | The default variable that stores the XSD serialized type |
Output | Error Message | Output variable for the step error message |
Example
- In a Designer Project, click CREATE FLOW on the Global Action Bar and click Flow. Name the Flow and click CREATE.
- In the Flow Designer, click and drag the Fetch Entities step to the workspace. Click the Type Name dropdown list under the ENTITY FETCH DEFINITION category on the Properties panel. Enter "account" in the search box and click Account [DecisionsFramework..].
- Connect the Done path of the Start step to the Fetch Entites step. Click the Results path and navigate to All All Steps [Catalog] > Data > Json. Select the Json Serialize step and click ADD.To create an example with XML and XSD, add the Xml Serialize or the XSD serialize step and click on the Readable XML Output under the OPTIONS category.
- In the Type dropdown box enter "account" and select Account [DecisionsFramwork].
- Click Unknown next to Object to Serialize field and select Select From Flow. Then, click Entity Results [Account[]] and select Last [Account]. Then, click DONE.
- Connect the Done, Error, and No Results path to the End step. Click Save on the top action panel to save changes.
Debug
- On the top action panel, click Debug. Then, click START DEBUGGING.
- After the Debugger runs, click the Json Serialize 1 step, select Execution 1, and click View Output Data.The serialize step has changed the type into a JSON Serialized String
Was this article helpful?