Free cookie consent management tool by TermsFeed

a!integrationError() Function

On This Page

Creates an integration error value for use in integration response rules.

See also: Integration Object, Web APIs

Parameters

a!integrationError( title, message, detail )

Keyword Type Description

title

Text

A short summary of the error or the error type.

message

Text

A description of the error.

detail

Text

Technical details about the error, including error codes or underlying error messages.

Returns

IntegrationError

Using the function

When to use a!integrationError

The a!integrationError() function is designed for use in the Error Message of an integration object. Integration objects allow you to define a custom error handling rule that determines how errors from external systems are surfaced to the calling expression.

Use a!integrationError() to construct a structured error response when an integration call fails. The function should not be used outside of integration error handling rules.

The a!integrationError() function returns a typed IntegrationError value rather than a generic map. The IntegrationError type has three fields: title, message, and detail. Using this typed value ensures that the calling expression can reliably access error information and take the appropriate action to guide users in their next steps.

Understanding the function variables in error handling rules

The function variables fv!success, fv!error, and fv!result map to the components of the integration response. The variables make those values available to custom error handling expressions.

  • fv!success (Boolean): Indicates whether the integration call completed without error.
  • fv!error (IntegrationError): Contains the default error information with fields title, message, and detail.
  • fv!result (HttpResponse): Contains the full HTTP response, including the statusLine, statusCode, headers, and body.

Example

The following example demonstrates the a!integrationError() function.

To experiment with this example, copy and paste the expression into an expression rule and click TEST RULE to see the output.

Customize an integration error message

In a call to another system that does not support PUT, the following error handling rule reformats the error with the HTTP status code:

1
2
3
4
5
=a!integrationError(
  title: fv!error.title,
  message: fv!result.statusCode & " - " & fv!error.message,
  detail: fv!error.detail
)

Returns:

1
2
3
4
IntegrationError
    title: "The external system cannot support the request"
    message: "405 - The requested URL does not support the PUT method"
    detail: "HTTP/1.1 405 Method not allowed"

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Partially compatible

Can be used with Appian Portals if it is connected using an integration and web API.

Offline Interfaces Partially compatible

Can be used with offline interfaces if loaded at the top of the interface.

Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Partially compatible

If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event).

Process Autoscaling Compatible

Can be used in autoscaled processes.

Event Consumer Filter Conditions Incompatible

Cannot be used in filter conditions.

Event Consumer Event Handlers Incompatible

Cannot be used in event handler expressions.

Feedback