In our application, we have a BPT Automatic Activity that performs an integration with an external system. When the external API fails, the activity continues retrying multiple times, which results in excessive logging and unnecessary traffic on both systems.
We attempted to control this by adding a custom retry counter inside the process flow, but the “Activity Close” action does not work as expected when the counter is added. As a result, the activity remains in a retry loop.
Could you please advise on the correct approach to limit or properly configure the retry behavior for a BPT Automatic Activity, ensuring the process stops retrying after a defined number of attempts and thereby reducing system load?
Hello,
Automatic activities in OutSystems have an uncontrolled retry mechanism that continues until success or termination according to the official documentation. As a workaround, you can place an API call inside the automatic activity and use its response (e.g., an IsSuccess flag in the automatic activity) to control the flow, deciding whether to retry or continue.
To further manage retries, you can add a local counter variable that increments each run and, upon reaching a set limit, abort, suspend, or handle the activity as needed. Keep in mind this is not an official approach but a workaround; as a result, a new instance is created each time the activity is retried as you will see in service center, in other words, it does not recognize this as a retry process, so this should be considered a tradeoff.
I hope this explanation clarifies the idea and proves helpful.
Hi Dona,
If an unrecoverable error occurs, you should call the ProcessTerminate action (from System) with the ProcessId variable (it's automatically there). ActivityClose is to force close a Human Activity, not to terminate the process.
1 BPT = 1 Process
1 Process contains a lot of Activity
You close an Activity, the Process is still active. In System, we can use ProcessTerminate to end the Process.
Why are you posting the exact same thing I already posted 16 hours before you did? Please read the other replies before posting!
oops, I am sorry for my inconvenience. I didn't read your reply, I need to be careful next time. Thanks for remind
Actually, I think I add more information about the relationship between Process and Activity, it should help to clarify the concern about closing Activity without terminating the Process.