Thanks for this precision Jean-Michel. Sorry for re-opening the issue, but I feel that I won't find much occasion to have an answer as clear as the one you delivered.
Is it possible for the mediation to move the file from transport.vfs.MoveAfterProcess
(where it was moved by the transport layer) to an other folder in case some issue occurs? Here is the relevant part of an error sequence where I try to move the file
- from
sftp://foo:***@localhost:2222/Process
- to
sftp://foo:***@localhost:2222/Errors
<fileconnector.move>
<source>{fn:concat($ctx:rsaFolderProcess ,$trp:FILE_NAME)}</source>
<destination>{fn:concat($ctx:rsaFolderErrors,$trp:FILE_NAME)}</destination>
</fileconnector.move>
(I am using the file-connector 2.0.20 and rsaFolderProcess
and rsaFolderErrors
have been defined)
This leads to the following error:
[2020-03-26 14:51:21,743] [] ERROR - FileMove Unable to move a file/folder.
org.apache.commons.vfs2.FileSystemException: Could not determine if file "sftp://foo:***@localhost:2222/Process" is writeable.
at org.apache.commons.vfs2.provider.AbstractFileObject.isWriteable(AbstractFileObject.java:1529)
at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1573)
at org.wso2.carbon.connector.FileMove.fileMove(FileMove.java:143)
at org.wso2.carbon.connector.FileMove.moveFile(FileMove.java:103)
at org.wso2.carbon.connector.FileMove.connect(FileMove.java:60)
.....
I checked the rights. The user foo
can write in Success
and /Errors
; the only problem being that the mediation sequence does not know that and is unable to move a file from the former to the latter. It is as if the rights declared in the transport layer were not inherited by mediations. How to fix this and achieve this goal?
Environment