Input Request-Response
Purpose
The Request-Response-Input Processor provides a two-way Http-Interface. Use this to if you want to provide an external interface which can be invoked by an external system (or it could be layline.io itself whichis invoking the interface, e.g. from another workflow.)
This Asset is used within a Workflow definition.
Prerequisite
You need:
Configuration
Name & Description
-
Name
: Name of the Asset. Spaces are not allowed in the name. -
Description
: Enter a description.
The Asset Usage
box shows how many times this Asset is used and which parts are referencing it. Click to expand
and then click to follow, if any.
Output Ports
This Processor can only have one Output Port to send messages on within the Workflow.
A port can have a name and description. A Port Name is mandatory.
You cannot delete the only Output Port.
Format
Assign a Http-Format which you have previously defined. This Input-Asset will process the requests and responses which are defined in that assigned Http-Format. The format will be applied on the incoming data so that it can be accessed via the data dictionary.
Source
Assign a Http-Source. The Source defines the physical addresses and ports on how this Input Asset can be reached.
Failure Handling
Processing within an Input Processor like this one can fail. In this section, you can define how the system should behave in case of problems.
Failure Types
One type of failure is observable:
# | Failure observables / Reaction | Ignore | Retry Event/Message | Retry Stream | Rollback Stream |
---|---|---|---|---|---|
1 | Source failure handling A problem occurred with the Source of the messsages. | ✔ | ✔ |
Failure Type Reactions
The following two failure reactions are supported.
Rollback Stream
Rollback the complete stream. In the case of batch/file processing for example the complete file (which represents the stream) will be rolled back and put into error. This is the default behavior.
A rollback signal will be issued to all participating Workflow Processors. Each Processor needs to ensure itself how to deal with a rollback. A Javascript Flow Processor, for example, which directly interacts with a database will have to react to a rollback signal:
function onRollback() {
if (connection) {
try {
connection.rollbackTransaction();
connection.closeConnection();
} catch (err) {
} finally {
connection = null;
}
}
}
Retry Stream
Don't simply give up. Try to process the whole stream again. This option allows you to define how often and in what intervals the retries should be performed.
Stream Retry Settings
Max. Retries
: The number of retries which should be performed. For example "5".Min. Backoff [ms]
: Wait at least x milliseconds between each retry. For example "12000" (12 seconds).Max. Backoff [ms]
: Wait at max x milliseconds between each retry. For example "150000" (150 seconds).
Based on these parameters, the system will try to balance the defined number of retries within the time boundaries of min. backoff and max. backoff.
Taken the example numbers from above, the five retries would happen in this timespan:
Please note, that the creation of the online documentation is Work-In-Progress. It is constantly being updated. should you have questions or suggestions, please don't hesitate to contact us at support@layline.io .