Skip to main content
Skip table of contents

Filesystem Adapter

The Filesystem adapter gives you access to the filesystem in service context. You can read and write files (even incrementally), and read and create directories.

Find below a table listing some common tasks you can use the Filesystem adapter for, and which action to use for which task.

Task

Action

Mode

Important Parameter

Remarks

Write a complete file in one action.

write

  • If the file exists, it will be overwritten.

  • If the file does not exist, it will be created.

Replace part of a file.

write

position

Writes the data to the file beginning at the specified position. If the file does not exists you will get the exception FSADM/8 (see Catching Errors).

Append data to a file.

append

append

  • If the file exists, the given data will be appended.

  • If the file does not exist, it will be created.

Write a complete file line by line.

append

overwrite

Use mode overwrite for all appends.

  • If the file exists, it will be overwritten.

  • If the file does not exist, it will be created.

overwrite will only be applied to the first append. All subsequent appends (e.g. in a loop) automatically get mode append.

Copy a complete file.

copy

Copy a file in one action. Using copy you can even copy huge files because it does not load the complete file into memory.

Move a file to a new location.

rename

newName

Provide the new path of the file through the newName parameter.

Delete a file.

remove

If the specified file does not exist, no error will be reported.

Manipulate a file and process the file further (e.g. moving it).

  1. write or append

  2. close

  3. further processing

Before processing the file further (e.g. moving it), close the file. Otherwise it may be locked.

Adding a Filesystem Adapter Operation to a Diagram

Expand the path to the Filesystem adapter in the service panel (Base Types/Bridge Base/Base Components/Add Ons/FileSystem):

You can drag out operations from the data model to any diagram:

The example shows how to add a Filesystem adapter operation to a BPMN execution diagram:

drag_operation_filesystem.png

Configuring the Filesystem Adapter Operation

Once an operation has been added to a diagram, it needs to be configured as a Filesystem adapter:

grafik-20240926-092815.png

Click Add Stereotype to define the selected operation as to be a Filesystem adapter:

grafik-20240926-092826.png

Select Filesystem Adapter from the list of available adapter stereotypes. Click Save:

grafik-20240926-092842.png

The Attributes panel shows the added adapter stereotype. Now you still need to configure the adapter. Expand the stereotype by clicking the arrow on the right:

grafik-20240926-092908.png

To configure a Filesystem adapter, you have the following options:

grafik-20240926-092923.png
  • alias: A Filesystem adapter is configured via its alias. For more information see below.

  • mode: This option is only relevant for append operations.

Refer to Filesystem Adapter Reference for further information. The adapter option action derives from the used operation. Do not configure this.

You can select an existing alias from a drop-down list by clicking the text Select alias:

grafik-20240926-111825.png

If you want to remove an added alias, click the corresponding Minus option on the right side or select None from the drop-down list:

grafik-20240926-092634.png

You can also create and add a new alias by clicking Plus:

grafik-20240926-092647.png

Refer to Aliases for more information on how to create a new alias.

A dialog opens where you can choose an alias stereotype:

  • File

  • Directory

Select the desired alias stereotype and click Save:

grafik-20240926-092601.png

In the following dialog, name and configure the new alias. Click Save to create and add the new alias:

grafik-20240926-092615.png

Refer to Filesystem Adapter Reference for more information on the configuration options of this adapter.

FilesystemAdapter_ProductExport_Example

Click here to download a simple example model that shows the usage of the Filesystem adapter in Scheer PAS Designer.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.