Skip to content
Johannes Heucher edited this page Oct 12, 2022 · 4 revisions

Figure 1 Both Workflow Steps and the Workflow itself each provide a modeled Catch area to handle exceptions thrown inside the corresponding context.

The Catch area can be opened via the symbol . It can contain separate lanes for each Exception Type thrown.

Table of Contents

Exception and Server Exception

Additional to the exceptions thrown explicitly by the Service, the Catch area always includes the two Exception Types Exception and Server Exception by default. They designate occurring Java Runtime Exceptions (Exception) and/or exceptions originating from the Xyna Factory infrastructure (Server Exception).

Add a Catch Lane for a Specific Exception Type

To add a lane for one of the thrown Exception Types, enable it by double clicking the Exception Type. Inside the emerging lane all Modeling Blocks can be used as usual.

Unchecked Exception Types are regularly processed (i.e. the exception will be re-thrown and not caught).

Remove a Lane for a Specific Exception Type

To remove the handling for one of the thrown exceptions, select the exception lane and press delete Exception Type.

Output Substitution

If an exception is handled without rethrowing a new one, the Workflow will proceed to execute with the following steps. Therefore the Output Parameters hidden by the thrown exception must be set differently. By clicking on the caught Exception Type it changes the focus (visually marked blue) to the corresponding lane and enables setting it constantly or resolving ambiguities.

Accessing the Caught Exception

The caught Exception Type can be used like an Input Parameter of the Catch lane. That means it can be used as a normal Workflow Parameter in subsequent steps.

Catch Inside of a Service Step

Service Steps provide a Catch area to handle the exceptions that are thrown by the Service.

Catch Inside of the Overall Workflow

The overall Workflow provides a Catch area to handle all exceptions, that are thrown by its Service Steps or by Throw Steps.

Please note: In order to retain focus on subject-matter knowledge, only technical errors should be handled in Catch areas. Service-internally occurring errors like Runtime Exceptions and Server Exceptions should be avoided or retained within the Service implementation and converted into technical errors, if necessary (functional Exceptions Types can also be used by Services as Input and Output Parameters).

Retry

The Retry Step can be put inside of Catch lanes to re-execute the Service Step or in case of a global Catch the whole Workflow.

See Also

Clone this wiki locally