I have few JSON Payloads that have to be appended to a JSON file. This is how my JSON Payload will look:
{"variant": {"940894": {"attributes": {"Size": "XL" } } } }
I will be getting multiple json Payloads of this type. At the end I need to form a file that looks like this:
[
{"variant": {"940894": {"attributes": {"Size": "XL" } } } },
{"variant": {"940895": {"attributes": {"Size": "Med" } } } },
{"variant": {"940895": {"attributes": {"Size": "Small" } } } }
]
These are the properties I have set for the requirement:
<property expression="fn:concat('Test',get-property('File_Name'),'.txt')" name="FILE_NAME" scope="default"
<propertyGroup description="File and OutputPayload properties">
<property name="messageType" scope="axis2" type="STRING" value="text/plain"/>
<property name="ContentType" scope="axis2" type="STRING" value="text/plain"/>
<property expression="$ctx:FILE_NAME" name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
</propertyGroup>
<call>
<endpoint>
<address uri="vfs:sftp://username:password/home/user/test/out/json?transport.vfs.Append=true">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
But I get an error saying "The file type does not support append mode". What else can I try here.