I've done the following query two ways:
Using parent/child in Studio.
Using NXQL query in Studio and get the same error. Here is the NXQL.
SELECT * FROM Document WHERE ecm:isCheckedInVersion = 0 AND ecm:parentId = '@{Context["TRAVELERID"]}' AND ecm:primaryType = '@{Context["NEXTRECIPEDOCTYPE"]}' AND ecm:currentLifeCycleState = '@{Context["NEXTRECIPESTARTSTATE"]}'
All of the context variables resolve correctly in both cases. I have used similar queries in content views with success.
I get the following error:
org.nuxeo.ecm.automation.core.collectors.DocumentModelCollector cannot be cast to org.nuxeo.ecm.core.api.DocumentModel
I basically have a container document that has just made a state transition and I want to select one of the documents in the container. The query is trying to retrieve the "now active" document context so I can edit the metadata.
Any suggestions on what is wrong and how to troubleshoot this effort!?