I am successfully retrieving records from my Alfresco ECM instance. When I try to push them into MongoDb I get the following:
Failed to transform from "com.mulesoft.weave.mule.WeaveMessageProcessor$WeaveOutputHandler" to "org.bson.Document" (org.mule.api.transformer.TransformerException). Message payload is of type: WeaveMessageProcessor$WeaveOutputHandler
I am using Dataweave to convert the query records to Json, but I am not sure why this is occurring.
Here is my flow:
<flow name="mongotestFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/add" doc:name="HTTP"/>
<cmis:query config-ref="CMIS__Configuration" statement="SELECT cmis:objectId,cmis:name,cmis:contentStreamLength,cmis:creationDate,cmis:lastModifiedBy, cmis:lastModificationDate from cmis:document where cmis:createdBy <> 'System'" doc:name="CMIS"/>
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/json
---
payload.properties map {
"size": $.values[2][0]
}
]]></dw:set-payload>
</dw:transform-message>
<mongo:insert-document config-ref="Mongo_DB__Configuration" collection="testCollection" doc:name="Mongo DB" document-ref="#[message.payload]"/>
</flow>
Any help would be greatly appreciated.
-S