Http

Article • 02.08.2022 • 6 minute(s) to read

Http

Http executes a HTTPS Request to an HTTPS server and maps the results to Variables. The request will timeout once the duration set in Timeout is elapsed.

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.
Http

HTTP 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

Configure the HTTPS request and handle the response

  • Base address - Protocol and host name, e.g., https://www.example.com. Can be entered directly or be determined by a Process Context Expression.
  • Path - Path, e.g., /api/test, that will be appended to the Base address to form the URL. Can be entered directly or be determined by a Process Context Expression.
  • Headers - HTTP headers that are set for the request. A new request header is added by clicking Add:
    • Key - Name of the request header
    • Value - Value of the request header entered either directly or determined by a Process Context Expression.
    • Each header configuration can be deleted by clicking on .
    • The header accept with its value application/json is automatically set, but additional values can be added to the header accept by specifying them as a new header entry.
  • Query parameters - HTTP query parameters added to the request. A new query parameter is added by clicking Add:
    • Key - Name of the query parameter
    • Value - Value of the query parameter entered either directly or determined by a Process Context Expression. The value is is automatically URL encoded.
    • Each parameter configuration can be deleted by clicking on .
  • Method - The HTTP method for the request. Depending on the HTTP method additional configurations are available:
    • GET and DELETE do not have any additional configurations

    • POST, PUT and PATCH offer the option Use multipart form data to send name-value pairs and files automatically encoded in the multipart/form-data content type. If this is set to Yes, the content type is automatically set for the request and the following configuration are available:

      • Form data - Name-value pairs send to the server encoded as multipart form data. A new name-value pair is added by clicking Add:
        • Key - Name of the value send to the server
        • Value - Value send to the server entered either directly or determined by a Process Context Expression.
        • Each name-value pair configuration can be deleted by clicking on .
      • File data - File send to the server encoded as multipart form data. A new file is added by clicking Add:
        • Key - Name of the file send to the server
        • Value - File ID specifying which file stored on the Novunex platform will be send to the server. The file ID can be entered either directly or be determined by a Process Context Expression.
        • Each file configuration can be deleted by clicking on .

      If Use multipart form data is set to No, you have the following configuration options:

      • Body content type - Content type of the HTTPS request body
      • Body - Body of the HTTPS request entered either directly or determined by a Process Context Expression. Be aware that the body cannot be a file. To submit files to a HTTPS server, the multipart encoding with Use multipart form data set to Yes has to be used.
  • Create entity - Specifies if a new Entity Variable is created (Yes) or not (No). If set to Yes, the new Entity Variable will have the name configured in Variable.
  • Set entity attributes - Mapping of the HTTP response or error to Variables. A new mapping mapping is created by clicking clicking Add:
    • Key - The key specifies the target of the mapping and can be:
      • The name of an Attribute in the newly created Variable, only if Create entity is set to Yes.
      • An existing Variable and Attribute, like MyEntityVar.MyAttribute or MyContextVar, if Create entity is set to No.
      • A new Context Variable, only if Create entity is set to No.
    • Value - Offers several keywords to access different parts of the response:
      • response - The body of the response. If the response is in JSON-Format, its properties can be directly accessed by a period and their name, like response.FirstValue or response.SecondValue.MyProperty. For more complex parsing of JSON responses, including the access to values inside arrays, and for parsing non-JSON responses either the Set Activity with its SelectToken functions, the Parse Activity or the Execute Activity need to be used.
      • statuscode - HTTP status code of the response
      • header - The header of the response. Specific header information can be accessed by appending a period and the name of the header like header.Server or header.Content-Type. Be aware that the header names are case sensitive.
      • exception - If an exception occurred, this holds the description of said exception with information beyond the status code.
    • Each mapping can be deleted by clicking on .
  • Variable - Name of the newly created Entity Variable. This filed is ignored when Create entity is set to No.