Hello Alex,
Sorry for answering a bit late.
I am sure that I confused you a bit with my previous post, sorry in advance.
Actually, when you proceed inside a workflow JS activity, the collection is directly named as the schema parameter part without the space name.
It is in webApp and report that XML element is added with -collection.
Please may you execute this code in a Javascript activity in a workflow, you should get the right values of the itemized list given in parameter:
// itemized list (énumération in French) for a database enum (xtk:enum)
var enumId = "576797577"; // webAppNature itemized list (check your value in your own instance)
var queryXtkEnumValue = xtk.queryDef.create(
<queryDef schema="xtk:enumValue" operation="select">
<select>
<node expr="@label"/>
</select>
<where>
<condition expr={"[@enum-id]=" + enumId} />
</where>
</queryDef>)
try
{
var resXtkEnumValue = queryXtkEnumValue.ExecuteQuery();
logInfo("[WKF337] get the values enumValue of the itemized list id = " + enumId + " (xtk:enum)");
logInfo("[WKF337] Count of values = " + resXtkEnumValue.child('enumValue').length());
}
catch(e)
{
logWarning("[WKF337] Error in getting the values enumValue of the itemized list id=" + enumId + " (xtk:enum)");
logError("[WKF337] Error number: " + e); // or use logWarning the treatment must go on despite this error
}
for each(var value in resXtkEnumValue.enumValue) // there is no['enumValue-collection'] node in workflow (as there are in webApp and report)
logInfo("[WKF337] value = " + value.@label);
for each(var value in resXtkEnumValue.enumValue) // there is no['enumValue-collection'] node in workflow (as there are in webApp and report)
logInfo("[WKF337] value = " + value.@label);
You should get this result in the log trace:

Moreover, if you don't need complex queries (or some specific queries as dynamic IN parameter), whatever being in workflow/webApp/report, you can use Query activity instead.
Best Regards.
Jean-Serge