Error: "SecureProperties is undefined" when implementing custom composite types and SecureString in custom Orchestrator action for custom forms
search cancel

Error: "SecureProperties is undefined" when implementing custom composite types and SecureString in custom Orchestrator action for custom forms

book

Article ID: 454667

calendar_today

Updated On:

Products

VCF Automation VMware Cloud Foundation VMware vRealize Automation Cloud

Issue/Introduction

  • Attempting to develop a custom Orchestrator action using SecureString type fails
  • Customer can use the SecureString property in the UI without declaring it in the scripting box

Environment

Aria Automation Orchestrator 8.x, 8.18.1
VCF 5.x, 5.2.1
VCF Automation 9.x

 

 

 

Cause

  • Orchestrator action output and inputs must yield primitive types (e.g. string, number, boolean, Date) or structured arrays/key-value mappings (e.g. Array/string, Properties or Array/Properties) as referenced in Using VMware Aria Automation Orchestrator actions in the custom form designer in Automation Service Broker.
  • `SecureString` and `CompositeType` are complex objects and are calculated by the platform, not the script. The platform does the intermediary work to translate plain objects from the script to their desired end, such as encryption, to pass to the next workflow step.

Resolution

  1. Define your workflow's input schema using the composite type syntax (for example: CompositeType(InputName:string, InputValue:SecureString):CustomTypeName)
  2. Return a plain JavaScript object in the Orchestrator action whose keys match the composite field names exactly

    var obj = new Properties(); // or: var obj = {};
    obj.InputName = currentInput["name"];
    obj.InputValue = passwordString; // plain string; typed as SecureString by the declaration
    return obj;

  3. Configure the custom form field
  4. Bind the form elements to the external action

Additional Information

Good Practices for Developing Custom Forms with VMware Cloud Foundation Automation