Request fails with "Expected type ARRAY but was STRING" when using Data Grid in ServiceNow for VMware Aria Automation 8.x
search cancel

Request fails with "Expected type ARRAY but was STRING" when using Data Grid in ServiceNow for VMware Aria Automation 8.x

book

Article ID: 426567

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

When submitting a new build request from ServiceNow using the VCF Automation Plugin for an item in the VMware Aria Automation catalog, the request fails.

This issue is observed when a Data Grid variable on the request form is populated by a VMware Aria Orchestrator (vRO) action.

The following error is returned during the catalog request submission:

Error occurred while submitting Catalog Request. 
Error: {
  "message": "disks[0].mountPoints: Expected type ARRAY but was STRING.",
  "statusCode": 400,
  "errorCode": 10006
}

In the ServiceNow interface, the value for the Data Grid variable may display incorrectly as <object><object>.

Environment

 

  • VMware Aria Automation/Orchestrator 8.18.1

  • ServiceNow Yokohama

 

Cause

The ServiceNow plugin currently supports only "Array of String" as the return type for Data Grid variables. The VMware Aria Orchestrator action configured for this form is returning a composite data type. The plugin cannot process the composite object, causing a data type mismatch.

Resolution

This is a known limitation in the current version of the ServiceNow plugin.

Workaround To resolve this issue, you must modify the custom VMware Aria Orchestrator action used to populate the Data Grid variable:

  1. Open the VMware Aria Orchestrator client.

  2. Locate the action used to populate the Data Grid in the catalog item.

  3. Modify the action's logic to return an Array of String instead of a composite data type.

  4. Save the action.

  5. Retry the request from ServiceNow.

Once the return type is changed to an array of strings, the data will transform correctly, and the request will proceed without the type mismatch error.