Unarchive
Allows to uncompress an archive with a .zip extension. For example it can be used to generate an arhive of images or files generated by another task.
Json
Example
json
{
"name": "file-conversion-unarchive",
"taskReferenceName": "unarchive",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILE",
"file": "${previous_taskReferenceName.output.file}"
}
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Definition
| Property | Type | Required | Description |
|---|---|---|---|
| The name (or type) of the task | |||
| The unique name of the task in your job. It is used to reference this task in the workflow. | |||
| The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW. | |||
true: the job continues if there is an error on this task. false: the job fails. | |||
| Input parameters of the task. See below |
Inputs
| Property | Description |
|---|---|
| mode | Enum FILE | FILES | REQUEST. |
| request | A valid input |
| file | A valid input. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.file} , or a static file, example: file://assets/file.xml, or a user input, example: ${workflow.input.input_key}. |
| files | A valid input. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.files} , or a user input, example: ${workflow.input.input_key}. |
| compressionMethod | - Enum - zip, 7z, tar, gzipIf no compression method is specified, the application will attempt to detect the most appropriate decompression mode. |
| password | - String If appropriate, the password to decrypt the file |
Outputs
| Property | Type | Description |
|---|---|---|
| allFilesTransformed | YES | NO. YES: all files have been transformed successfully. NO: at least one file has not been transformed. | |
| file | The first file found in the archive. | |
| files | All the files found in the archive. | |
| listing | The listing of the temporary files. | |
| report | Report on the integration. View below for more details. |
Output listing
Example
xml
<Files>
<File source="my-zip.zip">
<Path>/folder/image-1.jpg</Path>
<Url>https://pl.com/image-1.jpg</Url>
<Md5>a28ZCRcCSc8orBK+iXxTUw==</Md5>
<Sha256>c4d5710e040627a040f0fd7a6ceddfc642e8cddc8a83a7e6c104d67a2ca493c7</Sha256>
<Size>1954387</Size>
</File>
</Files>1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Definition
| XPath | Description | Occurs |
|---|---|---|
| File | Root of the document. | 1 |
| ./File | For each file. | 0..* |
| ./File/Path | The complete path of the file. | 1 |
| ./File/Md5 | The md5 of the temporary file. | 1 |
| ./File/Sha256 | The md5 of the temporary file. | 1 |
| ./File/Size | The size of the temporary file. | 1 |
Output report
Example
xml
<Report task="file-conversion-unarchive" start-at="2023-01-20T13:27:54.810Z" task-cid="..." job-cid="..." end-at="2023-01-20T13:28:51.414Z" duration-ms="56604">
<Input name="mode">(le mode passé en paramètre de la tâche)</Input>
<Input name="request">(l'url du fichier request - si celui-ci est présent)</Input>
<Log type="warning" code="URL_NOT_REACHABLE">
<Metadata name="xpath"></Metadata>
<Metadata name="path">//abc/a.jpg</Metadata>
<Message>The url provided is invalid or the content is unreachable: https://www.google.com/abc/a.jpg</Message>
</Log>
</Report>1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
| XPath | Description | Occurrence |
|---|---|---|
| /Report@task | Task name | 1 |
| /Report/Input | Inputs used in the task | 1..* |
| /Report/Log | For each log | 0..* |
| /Report/ Log @type | Enum: error, warning or info | 1 |
| /Report/ Log / Metadata-Collection | Metadata collection | 0..* |
| /Report/ Log / Metadata-Collection@name | Metadata collection name | 1 |
| /Report/ Log / Metadata | Metadata | 0..* |
| /Report/ Log / Metadata@name | Metadata name | 1 |
| /Report/ Log /Message | Message | 1 |
Limits and additional notes
| Element | Limit | Best practice |
|---|---|---|
| Input zip file size | 1Go | 100mo |
| Size of all unarchived files | 6Go | 500mo |
| Maximum number of files | 15 000 | 200 |
FAQ
How to manage multiple zip files?
Use mode = FILES and the input files.