FileStore

If you want to use the filestore in your own actions, use the following interface of the \Workflow\VTEntity class, given to the action in $context.

To store a file inside the filestore:

$context->addTempFile($filepath, $filestoreid, $filename);

Parameter

$filepathStringThe temporarily path to the file you create This file will be moved to the central tmp directory inside Workflow Designer
$filestoreidStringThe ID you want to use, to store the File
$filenameStringThe filename of this file. Could be used by tasks to use the correct filename

To load a file from filestore:

$file = $context->getTempFiles($filestoreid);

Parameter

$filestoreidstringThe ID of the file you want to get

Returns

array(
   "path" => <absolute path to the file>,
   "name" => <filename you set during addTempFile>
)

Artikel-PDF herunterladen