Hello,
I got a multi-value blob document property that was perfectly set by a run script such as :
if (WorkflowVariables["newFile"] != null){
java.util.Collections.addAll(Context["listBlob"], Document.getProperty("xpathofme:listBlobsOfMe"));
Context["listBlob"].add( WorkflowVariables["newFile"] );
//THIS CODE FAILED IN 5.8
Document.doc.setPropertyValue("xpathofme:listBlobsOfMe", Context["listBlob"].toArray());
}
New exception in 5.8 :
Caused by: org.nuxeo.ecm.core.api.model.PropertyConversionException: Property Conversion failed from class java.util.ArrayList to interface org.nuxeo.ecm.core.api.Blob
at org.nuxeo.ecm.core.api.model.impl.primitives.BlobProperty.normalize(BlobProperty.java:75)
at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.setValue(AbstractProperty.java:329)
at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.setValue(ComplexProperty.java:206)
at org.nuxeo.ecm.core.api.model.impl.osm.ComplexMemberProperty.setValue(ComplexMemberProperty.java:69)
at org.nuxeo.ecm.core.api.model.impl.ListProperty.setValue(ListProperty.java:253)
at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.setPropertyValue(DocumentModelImpl.java:1498)
NOTHING changed in Nuxeo Studio... we just increase version from 5.6 to 5.8 and this list is STILL a blob-list. Do you know why the code doesn't works anymore ?
Thanks