Automation Anywhere 설명서 읽기 및 검토

Automation 360

콘텐츠 닫기


콘텐츠 열기

Return a value from an action

  • 업데이트: 2022/05/19
    • Automation 360 v.x
    • 구축
    • RPA Workspace

Return a value from an action

Set the following properties on CommandPkg to store the action output in a variable.

Action return values

  • return_type

    Defines the return type of the action. It usually matches the entry method return type.

  • return_required

    When the value is set to true the return value is required.

  • return_label

    A description of the UI label for the variable value.

Example: Convert a sourceString to uppercase and assign the result to returnTo

//BotCommand makes a class eligible for being considered as an action.

//CommandPks adds required information to be displayable on the UI.
		//Unique name inside a package and label to display.
		name = "uppercase", label = "[[Uppercase.label]]",  
		node_label = "[[Uppercase.node_label]]",  description = "[[Uppercase.description]]", icon = "pkg.svg", 
		//Return type information. return_type ensures only the right kind of variable is provided on the UI. 
		return_label = "[[Uppercase.return_label]]", return_type = STRING, return_required = true)
public class Uppercase {
	//Messages read from a fully qualified property file name and provides i18n capability.
	private static final Messages MESSAGES = MessagesFactory

	//Identify the entry point for the action. Returns a Value <String> because the return type is String. 
	public Value<String> action(
			//Idx 1 would be displayed first, with a text box for entering the value.
			@Idx(index = "1", type = TEXT) 
			//UI labels.
			@Pkg(label = "[[Uppercase.sourceString.label]]") 
			//Ensure that a validation error is thrown when the value is null.
			String sourceString,
피드백을 보내주십시오