Expose property attributes of action

The property values of an action can be exposed by setting the following properties on CommandPkg.

Action property values

Property Attributes Description

no1
name The name of the property, unique at action level, in auto-complete box this name would appear.

no2
description A description of the property.

no3
type The data type on which property operates, only if the type matches, the property will be appear in the auto-complete box.

no4
return_type The return data type of the property. If this type does not match the field type where it is used, there will be a validation error.
@BotCommand
@CommandPkg(label = "Uppercase", name = "uppercase", description="Converts the string to upper case", 
icon = "uppercase.svg", node_label="Convert {{sourceString}} to upper case| and assign the result to {{returnTo}}", 
return_type=DataType.STRING, return_required = true, return_label="Assign the output to variable") public class UpperCase {
 
    @Execute
    public Value<String> convert(
            @Idx(index = "1", type=TEXT)
            @Pkg(label="Source string")
            @NotEmpty
            String sourceString){
        return new StringValue(sourceString.toUpperCase());
    }
}
Tip: The character | acts as a separator node label. The content before and after the | character appears only when there is an input for the variables declared in each part. For example, in the above sample, when the {{sourceString}} variable has a value, the content before the | appears, and when {{returnTo}} has a value, the content after the | appears.
For example, the above class in the UI will look like:
Expose Properties