Unable to access a input passed to a scriptable task using PowerShell 7.4 runtime environment.
This article provides guidance on how to access the passed in inputs.
Environment
Aria Automation 8.18.x
Cause
This behavior is observed when the return statement in the Aria Automation action is declared outside the designated handler function.
Resolution
Ensure that the return statement within the PowerShell script of your Aria Automation action is enclosed within the Handler function. This ensures that the action's output is properly captured and returned as expected.
Example :
For an action written in PowerShell, the return statement must be within the handler function as shown below:
function Handler($context, $inputs) {
return "Test"
}
By adhering to this structure, the "Test" string will be successfully returned as the action's result.