Restituisce un valore da un'azione
Imposta le seguenti proprietà su CommandPkg per memorizzare l'output dell'operazione in una variabile.
Valori di ritorno azione
- tipo_reso
- Definisce il tipo di restituzione dell'operazione. In genere corrisponde al tipo di ritorno del metodo di immissione.
- reso_obbligatorio
- Quando è impostato su true, il valore restituito è obbligatorio.
- etichetta_reso
- L'etichetta dell'interfaccia utente quando viene richiesta la variabile per archiviare il valore.
@BotCommand
@CommandPkg(label = "Uppercase", name = "uppercase", description="Converts the source 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",
property_name="uppercase", property_description="Converts the string to upper case", property_type=DataType.STRING,
property_return_type=DataType.STRING) 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());
}
}
}