File

Article • 02.08.2022 • 6 minute(s) to read

File

File fetches one or more files via the HTTP or HTTPS protocol and stores them on the Novunex Platform in your Subscription. The request will timeout once the duration set in Timeout is elapsed.

You have to make sure that the number of files to fetch, i.e., the number of configured Base URLs, matches the number of configured file names, descriptions and categories.

This Activity can have an arbitrary amount of Outcomes, but all Outcomes must have the same name. The script of each Outcome is evaluated once the Activity has completed. Each Outcome with a script evaluating to true is followed. If more than one Outcome script evaluates to true, the Instance is paralleled. If no Outcome script evaluates to true, the Instance is ended by entering the closed-state.

Activity config

General
  • Name - Name of the Activity.
  • Version - Version of this Activity used in the Process. If a new version of this Activity is available and you want to use it, you have to manually update the version here. When a new Activity is added to the Process, automatically the latest version is placed.
  • Timeout in second - Once this time is elapsed, the Activity is closed and the Instance changes into the faulted-state. The default Timeout is two minutes. The timeout can be shortened and extended by entering a custom duration. If the Activity is left after a timeout, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after a timeout does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
  • Hide in process graph - Controls if the Activity is hidden (Yes) or shown (No) in the Process Graph on the Execution Screen.
  • Continue on error - If this is set to Yes, the execution of the Instance continues even if the Activity failed. If set to No, the Instance fails when the Activity fails by entering the faulted-state. In the case of a continuation after an error, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after an error does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
File

File Activity specific configurations

GENERAL

General interaction configuration, shared with most other Activities

  • Disable activity - Disables (Yes) or enables (No) the Activity. When disabled, the Activity is not executed and passed like a Connection by following the first Outcome. If multiple Outcomes have the same name as the first Outcome, all of them are followed. Disabling the Activity does not effect the Outcome Scripts, i.e., still only Outcomes with Outcome Scripts evaluating to true are followed.
  • Retry on error - If set to Yes, an automatic retry is executed up to ten times. If set to No, no retries are done. Retries are issued when the Activity failed so that the Instance would enter the faulted-state if the retry is disabled.
  • Additional text for task list - Description of this Activity shown to the Users in their task list. You can enter this text directly or use Process Context Expressions to compile it.
SETTINGS

File configuration

  • Base URL - HTTP or HTTPS URL of the file that will be fetched. It can be entered directly or be determined by a Process Context Expression.

    • Add - Adds a new Base URL configuration
    • - Deletes a configured Base URL
  • Resize if image - If the file fetched is either a JPEG or PNG image, this option can be used to resize its resolution before it is stored. If set to No, no resizing will be done. If set to Yes the new size has to be entered:

    • Width - New width of the image specified in pixels. If this field is left blank, the width is not changed
    • Height - New height of the image specified in pixels. If this field is left blank, the height is not changed
  • Name - Name and extension assigned to the file once it is fetched. It can be entered either directly or be determined by a Process Context Expression. If no name or an empty name is specified, the name will be left empty. While the File Activity can work without a file name and extension, other components of the Novunex Platform might not. Therefore, it is strongly recommended to assign a file name and extension that matches the file’s content like MyPicture.jpg, MyDocument.docx, MyReport.pdf.

    • Add - Adds a new Name configuration
    • - Deletes a configured Name
  • Description - Descriptive text assigned to the file once it is fetched. It can be entered either directly or determined by a Process Context Expression. If no description or an empty description is specified, the description will be left empty.

    • Add - Adds a new Description configuration
    • - Deletes a configured Description
  • Category - Category information assigned to the file once it is fetched. It can be entered either directly or determined by a Process Context Expression. If no category or an empty category is specified, the category will be left empty.

    • Add - Adds a new Category configuration
    • - Deletes a configured Category
  • Variable - Configures in which variable the array of IDs of the new files are stored:

    If Create entity is set to No, this field here needs to be filled and is not allowed to be left empty. However, if Create entity is set to Yes, this field can be filled but need not be filled:

    • In case it is filled, the IDs of the created files are stored in the configured Attribute or Variable in addition to the newly created Entity Variables.
    • If this field here is not filled, the IDs of the created files are only stored in the newly created Entity Variables and nowhere else.
  • Create entity - You can use an existing Entity Variable or a Context Variable to store the links to the fetched files when this option is set to No. If set to Yes, a new Entity Variable will be created:

    • Entity type - Type of the new Entity Variable
    • Entity attribute file Id - Array Attribute of type File where the links to the fetched files are stored.
    • Set entity attribute values - This section allows you to set further Attributes of the newly created Entity Variable. Clicking Add adds a new configuration:
      • Key - Name of the Attribute you want to configure
      • Value - Value of the Attribute specified either directly or determined by a Process Context Expression
      • - Deletes a configured Attribute
    • Variable - Name of the new Entity Variable