This activity designed to output information or messages in the output window
or log files during the execution of a workflow. It is commonly used for debugging
and logging purposes, allowing developers to inspect and monitor the flow of the
automation process.
Technical Reference
MISC |
Display Name: Displays the name of the activity. The activity name can also be customized to help in troubleshooting. |
|
Text: This parameter indicates to provide the “Input” value to write in the output window.
You have the option either to hardcode the values in “String” variable or you can input the values in “String” format.
This accepts only “String” datatype. |
||
TextWriter: This parameter indicates to write the “Input string” variable that we are passing into other targeted areas or application.
You have the option either to hardcode the values in “String” variable or you can input the values in “String” format.
This accepts only “String” datatype. |
Here’s an example of how the “WriteLine” activity works –
In the following example, I am continuing from the “Assign” activity example to write
the output in the output window.
1. Create a new solution or open an existing solution.
2. Drag and drop the “WriteLine” activity to the below to the last assign activity .
3. Here I am entering the value as “Amount:” +TotalCost.ToString in the “Text” field.
a. The “.ToString” is advised to use along with any other data types other than
string format. It converts any data type into string.
4. Now, save and execute the workflow.
Below is the sample output of the activity.