WriteLine Activity

Purpose: Write a line of text to the console. This activity is useful for logging, debugging, and displaying messages during workflow execution.

Input Properties

Text

The text to write to the console.

Type: string

Required: Yes

Note: Can be a literal string, expression, or variable reference. Supports all Elsa expression syntaxes.

Output Properties

This activity has no output properties.

Usage Example

Scenario: Log a message during workflow execution

Configuration:
- Text: "Workflow started successfully"

Result:
- The message "Workflow started successfully" is written to the console output
- The activity completes immediately after writing
Scenario: Log a dynamic message using expressions

Configuration:
- Text: "Processing item {{ Variables.ItemName }} at {{ DateTime.Now }}"

Result:
- The message is evaluated and written with actual variable values
- Example output: "Processing item Product123 at 2024-01-15 10:30:00"

Important Notes

  • The output is written to the standard output stream (console)
  • You can use expressions, variables, and all Elsa expression syntaxes in the Text property
  • This activity is non-blocking and completes immediately after writing
  • Useful for debugging workflows and providing execution feedback
  • The output can be captured by logging systems configured in your application
  • For file logging, consider using other activities or custom logging solutions

Related Activities