Thursday, December 16, 2021

OIC - About Virtual File System(VFS)

Virtual File System:

  • The Virtual file system (VFS) enables us to store files and internally use references to these files in the message payload.
  • We can also map the VFS file's content to a string element.
For example,
  • The FTP adapter uses fileReference for reading / writing a file without a schema. fileReference is also a reference to a file stored in the VFS.
  • The Rest adapter supports the multipart attachment and application/octet-stream features. The attachment is stored in a staging area and an attachmentReference is generated. The attachemntReference key is sent as part of thr message payload and latet fetches the attachment instance from the staging area.
Map the content of a staged file attachment toa string element by converting the content to a base64 string. 

Following 2 xpath functions are used:
  • encodeReferenceToBase64(String reference): input - the reference and Output - base 64 encoded content of the file.
  • decodeBase64ToReference(String base64String): Input - base64 encoded value and Output - reference or location of the file.

Available reference or relative path:
  • fileReference
  • attachmentReference
  • streamReference

When an attachment is stored in the vfs, a key is generated to retrieve the attachement later time. The key is shown in the mapper as attachementReference/fileReference/streamReference. The key is propagated with the OICS as part of the payload. For rest adapter streamReference is used. For FTP fileReference is used. Depending on the adapter type, the appropriate reference gets created.  Using the reference , we can fetch the content of the file and use or map the content as needed.

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...