Serialization
  • 09 Mar 2021
  • 2 Minutes to read
  • Dark
    Light

Serialization

  • Dark
    Light

Article Summary

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 CategoryNameExplanation
ParameterTypeType of data that will be serialized (can be a User Defined type or a default Decisions type)
ParameterIgnore NullIgnores all null values in a JSON object
InputObject To SerializeThe input variable expecting an object from the user-selected type
OutputJsonSerialize1_OutputThe default variable that stores the JSON serialized type
OutputError MessageOutput variable for the step error message

XML Serialize Step

Setting CategoryNameExplanation
OptionsReadable XML OutputWord wraps the output of the step to make it easy to read
OptionsTreat Null String Like Empty StringChanges null strings values into empty string values
OptionsOutput EncodingSupports Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32
OptionsInclude BOM in OutputAdds a Byte Order Mark to the serialized output
ParameterTypeType of data that will be serialized (can be a User Defined type or a default Decisions type)
InputObject To SerializeThe input variable expecting an object from the user-selected type
OutputXmlSerialize1_OutputThe default variable that stores the XML serialized type
OutputError MessageOutput variable for the step error message

XSD Serialize Step

Setting CategoryNameExplanation
OptionsReadable XML OutputWord wraps the output of the step to make it easy to read
OptionsTreat Null String Like Empty StringChanges null strings values into empty string values
OptionsOutput EncodingSupport Encoding of Unicode, ASCII, UTF7, UTF8, or UTF32
OptionsInclude BOM in OutputAdds a Byte Order Mark to the serialized output
ParameterTypeType of data that will be serialized (can be a User Defined type or a default Decisions type)
InputObject To SerializeThe input variable, expecting an object from the user-selected type
OutputXSDSerialize1_OutputThe default variable that stores the XSD serialized type
OutputError MessageOutput variable for the step error message

Example 

  1. In a Designer Project, click CREATE FLOW on the Global Action Bar and click Flow. Name the Flow and click CREATE.
  2. 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..].
  3. 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.



  4. In the Type dropdown box enter "account" and select Account [DecisionsFramwork].
  5. 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.
  6. Connect the Done, Error, and No Results path to the End step. Click Save on the top action panel to save changes.


Debug

  1. On the top action panel, click Debug. Then, click START DEBUGGING.
  2. 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?