Serialize

This activity is used to convert a given XML object to a string value.

Technical Reference

 

INPUT

DataObject: Specify the variable declared for an XML object in the previous activity, which has to be serialized to a string.

 

 

 

 

 

MISC

DisplayName: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”. By default, it is set to “False.”

True: Continues the workflow to the next step

False: Stops the workflow and throws an error.

Version: It specifies the version of the XML automation feature in use

OUTPUT

Output: Declare a variable here to see the output of the serialized object.

*Mandatory fields to execute the workflow

Use Case

The following activity illustrates how we can use the serialize activity to convert an
object to a string value. Here we use the output of the Get XML object activity as the
input of the Serialize activity.

Steps to execute the bot

1.      Drag and drop a get XML object activity to the workflow which is the scope.

2.      Specify the file path of the XML file.

3.      Declare the variable as xmlobj in the xmldocument box of the output segment of
 the get xml object activity.

4.      Drag and drop a serialize activity below the get XML object activity.

5.      Specify the input as xmlobj which is the output of the Get xml object activity.

6.      Declare a variable here in the output box of the output segment. Here it is “serxml”

7.      Drag and drop a writelog activity to the workflow.

8.      Specify the input string as the variable of the serialize activity. Here it is “serxml”

9.      Mention the log level as “info.”

10.   Execute the workflow to see the output of the xmlobject converted to string.

The bot executes the workflow and converts the XML object to a string value
and gives as a output.