Petals-BC-Filetransfer 3.x

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History




|| Attribute || Description || Default value || Required ||
| filename \\ | The name of the file where the JBI message (the XML content) will be written in. \\
h1. Invoking service on incoming file

If you want to invoke a service in the JBI bus with files, put the files in the configured directory (read-directory). At each configured polling period (polling-period), the component fetchs the incoming files.

For each received files and according to the transfer mode (transfer-mode), the component creates a new message exchange and attachs the file, either as source or as attachment.

If a file is put as a attachment, the name of the attachment is set to the name of the file, and in the source of the message&nbsp;exchange, the component put a XML structure like following :<attached-files>
<file-name>myFileName</file-name>
<attached-files>
The resulted message exchange(s) are sent to the target endpoint.

During the transfer, if the backup directory (backup-directory) is set, the transfered file is moved into it and never deleted&nbsp;by the component. Otherwise the file is moved to the system temporary directory.

When deploying a service unit like in the previous code snippet, all the files put in the directory $PETALS_HOME/filetransfer/in would be set as the payload of an invocation to the FileService service.

h2. Configurations

{include:0 CDK SU Provide Configuration}
\\
*Service Unit attributes to provide services*
|| Attribute\\ || Description\\ || Default Value\\ || Required\\ ||
| folder\\ | Working directory where files are written or retrieved. $ \{myEnvVariable\} environment variables are supported. | {center}-{center}\\ | {center}Yes{center}\\ |
| backup-directory\\ | The directory where files are moved after being read.Environment variables are supported with the form $\{myEnvVariable\}. | | |
| polling-period | | | |
| filename\\ | | | |
| transfer-mode | | | |
| base-message\\ | The skeleton of XML-message to send to the consumed service.\\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;It may contain <b>$content</b> or <b>$attachment</b>, or none of them. \\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;This is the way the component should link the file with the returned message.\\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<b>$content</b> will be replaced by the file content.\\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<b>$attachment</b> will set the file in attachment. It will be replaced by \\
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;a xop:include element which references the attachment (MTOM-like). | | |

h3. Service Unit descriptor