Skip to main content
Version: Next

TextTemplateActivity

Category: Common Steps Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: BusinessActivity Module: FlowManagement.Domain

Overview​

TextTemplateActivity (Text Template) is a node used for text template rendering in the process. It inherits from BusinessActivity and uses the Scriban template engine, supporting rendering process context data into a template to generate final text.

Configuration Description​

Property NameTypeRequiredDefaultDescription
TextContextstringNoTextTemplateRender_ValueProcess context key name for rendering result
TextTemplatestringYes-Template content (Scriban syntax)

Process Context​

Input Parameters​

All data in the process context can be used in the template.

Output Parameters​

Parameter NameTypeDescription
{TextContext}stringRendered text result

Usage Examples​

Basic Example​

{
"Type": "TextTemplateActivity",
"Name": "Generate Report Content",
"Alias": "GenerateReport",
"TextTemplate": "Product Name: {{ ProductName_Value }}, Quantity: {{ Quantity_Value }}",
"TextContext": "ReportContent_Value"
}

Using Loop​

{
"Type": "TextTemplateActivity",
"Name": "Generate Product List",
"Alias": "GenerateList",
"TextTemplate": "{{ for item in ProductList_Value }}Product: {{ item.Name }}, Price: {{ item.Price }}\n{{ end }}",
"TextContext": "ProductListText_Value"
}

Notes​

  • 💡 Uses Scriban template syntax, reference: https://github.com/scriban/scriban
  • 💡 All data in process context can be directly referenced in the template.
  • 💡 Supports advanced features like conditions, loops, functions, etc.
  • ⚠️ Template syntax errors will record exception logs.

Update History​

DateVersionDescription
2025-11-281.0Initial version

Last updated: 2025-11-28