You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

ExceptionHandler

Flow Elements - ExceptionHandler

Description

The Loop or ForEach element are used to iterate over collections of data.

Parameters

Name Description
Next Connects to another element’s Prev socket
HandledNodes Accepts connections from other element’s ExceptionHandler sockets.
DataTarget Connects to another element’s Prev socket. Passes on the exception details.

Search results for "ExceptionHandler"

Exception Handling

Exceptions within flows are handled on three different levels. Firstly if no ExceptionHandler is present in the Flow, every exception will be logged in the Structr log. If an ExceptionHandler is present, but not directly connected to the violating element, it will act as a global ExceptionHandler for the Flow and execute it’s connected actions and contain the related exception data. The last option to handle exceptions within Flows is to directly connect an ExceptionHandler to an element with a supporting socket. This will enable exception handling for the connected elements exclusively and not on a global scale.

ExceptionHandler

Exception handling within Flows can be realized using the ExceptionHandler element. If a Flow contains such element and the element is not connected via a red exception handling relationship, it will act as a global exception handler for all uncaught exceptions thrown within the flow. If an ExceptionHandler is connected to a supported element via a red connecting, it will act as handler for exceptions thrown by related elements.

Condition

Name Description
DataSource Accept another element’s DataTarget
ScriptSource Accepts another element’s DataTarget. Can be used to dynamically supply a script
Script Supplies script given for evaluation. Only used when ScriptSource is not connected
DataTarget Connects to a logic node DataSource or a Decision Condition
ExceptionHandler Connects to an ExceptionHandler’s HandledNodes socket

Aggregate

Name Description
Prev Accepts another element’s Next socket
Next Connects to another element’s Prev socket
CurrentData Accepts another element’s DataSource. Given data is made available as currentData within the scripting context.
Data Accepts another element’s DataSource. Given data is start value of the aggregation and used to set it’s initial value.
DataTarget Connects to another element’s DataSource socket. Contains the aggregated data of the element.
ExceptionHandler If connected to an ExceptionHandler, exceptions thrown in the scripting context will be handled by the referenced handler.
Script context used to aggregate the data. Return value will be written to the element’s data.

ExceptionHandler

Name Description
Next Connects to another element’s Prev socket
HandledNodes Accepts connections from other element’s ExceptionHandler sockets.
DataTarget Connects to another element’s DataSource socket. Passes on the exception details.