Server.query method throws exception "Invalid query" in VCF Automation 9.1
search cancel

Server.query method throws exception "Invalid query" in VCF Automation 9.1

book

Article ID: 442077

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

After upgrading to VCF Automation 9.1, the built-in Server.query method throws an unexpected exception, causing developed Automation workflows to fail.

The following error is observed in the logs:

ERROR Unable to query, reason : ch.dunes.query.DunesQueryFormatException: Invalid query: 'categoryid='XXXXX' 

This typically occurs with JavaScript code structured similar to the following example:

var result = Server.query("ResourceElement", "categoryid='" + System.getObjectId(category) + "' and name='" + RESOURCE_ELEMENT.NAME + "'");

Environment

VCF Automation 9.1

VCF Orchestrator 9.1 (Embedded)

Cause

This issue occurs due to an update in the VCF Orchestrator 9.1 engine.

Database field names used in the Server.query method are now strictly case-sensitive.

While lowercase fields like categoryid worked in previous library versions (such as 9.0), the updated engine requires the proper camel-cased format.

Resolution

This issue is under review with Broadcom Engineering.

Workaround:

To temporarily resolve this issue, you must edit the affected workflows and update the field names within the Server.query method to match the correct camel-cased format.
Example:

Replace categoryid with categoryId.