Add Retry Logic to Invoke Connections in Projects
You can add retry logic to invoke connections in projects that enables you to automatically retry failed invocations a specified number of times within a specified time period. Both retry settings are configured with default values, but you can update these settings, if necessary.
Capabilities
Retry logic provides the following capabilities:
- The number of invoke connection retries and the time between retries are automatically configured for you. You can also change these values, if necessary.
- Is available only in integrations in projects.
- Both business and runtime faults are retried. For example, a
business fault may be a duplicate customer error in Netsuite or a runtime fault
may be an
HTTP 500
error. - All faults from invoke connections are currently included as part of a retry. You cannot select the type of faults to retry or ignore.
- Retry logic can be added to as many invoke connections in an integration as you feel necessary. Retry logic is not handled at the integration level.
Add Retry Logic to an Invoke Connection at Design Time
- Open a project, and then open the integration in which to add retry logic.
- Click the Actions
menu of an invoke connection and select Add Retry Logic.
- Click Add when prompted to add new canvas
actions and move the selected invoke connection and its associated map action.
Your integration is updated with retry logic.
The retry logic consists of the following:- An assign action is added immediately above the while
action that controls the default number of retries (set to
3
) and the time between retries (set to5
seconds). You can update these values, as necessary.
Note:
Do not set your number of retries to a large value. This can impact performance. - The invoke connection and its associated map action are moved inside a scope action of the while action (for this example, the invoke connection callCustomer1 and map action callCustomer1). An assign action is also added to the scope. If your invoke connection did not include a map action, only the invoke connection is moved inside the scope action. A new map action is not created.
- A fault handler with a switch action is added.
- An assign action is added immediately above the while
action that controls the default number of retries (set to
Run an Integration Configured with Retry Logic
This section provides a view of activity stream output when invoke connection failures occur.
- Run an integration on which you added retry logic.
- Expand the activity stream and note that three retries (iterations)
were run (the default setting).
When the invoke connection fails, it is caught by the fault handler in the scope action. A variable increments the fault. Regardless of the error code (for example, an HTTP error or an XPath expression error), a retry is performed.
- Expand each failed iteration to view the timestamp between retries.
Note the five second delay between the first and second iterations (the default
setting).