Language: English
This article describes how the self-managed server runs automations: when steps run, how webhooks are delivered and retried, and when date-based triggers fire.
Execution
The self-managed server runs automations in its own process. When a record is added, edited or deleted, each active automation with a matching trigger starts a run, and its steps run one after the other.
Runs that are waiting, including webhook retries, are held in memory. If the server stops or restarts while a retry is waiting, that retry is not made.
Each run, with every step and its outcome, appears in the automation's run history.
Webhooks
Webhook URLs must use https://, and must not point to the ActivityInfo server itself (for example localhost or one of the server's own IP addresses). Other hosts on your private network are allowed. A webhook with a URL that does not meet these rules fails.
When a webhook step runs, the server sends the data to your URL and waits a maximum of 15 seconds for a response.
- Success: your server responds with a success status (any
2xxcode, like200 OK) within this time. The step is complete and the run continues with the next step. - Failure: the attempt fails if your server:
- takes longer than 15 seconds to respond (a timeout)
- is unreachable (for example, a DNS failure or a refused connection)
- returns any other status, including a redirect
Redirects are not followed
ActivityInfo does not follow redirects when sending webhooks.
If your server responds with a redirect status (like 301, 302 or 307), the attempt fails, even if the new Location is valid, and it is not retried.
Make sure your webhook URL is the final, direct endpoint and does not require a redirect.
Retry process
ActivityInfo retries a webhook only when the failure may be temporary:
- your server did not respond (a timeout or a connection failure)
- your server responded with
429 Too Many Requests - your server responded with a
5xxerror, like500 Internal Server Erroror503 Service Unavailable
Any other status, like 400 Bad Request or 404 Not Found, ends the run as failed straight away. You can retry it by hand from the run history.
A webhook step is attempted at most three times. The waiting period doubles after each failure, giving your server time to recover:
- 1st failure: waits about 5 minutes before the 2nd attempt.
- 2nd failure: waits about 10 minutes before the 3rd and final attempt.
- 3rd failure: the run ends as failed.
Each wait includes up to one extra minute, chosen at random, so that retries to the same server are spread out.
While a webhook waits for a retry, other automations keep running.
Date-based triggers
The server checks date-based triggers once an hour, 2 minutes past the hour. A trigger fires in the check for the hour it is set to, in its own time zone.
If the server is not running during that check, the trigger does not fire for that day.
What is logged
The last error of an automation is shown when you edit the automation. Each run, and the outcome of every step, is shown in the run history.
More detailed information, including errors that are later resolved on retry, is logged to the system logs.
- Successful webhook: a message is logged for every successful attempt, including the return code (for example,
Automation: [My Webhook] -> hook successful with return code: 200). - Webhook request: a message is logged for every attempt, showing the URL and the result code (for example,
Automation: Webhook request to https://example.com/hook result code is 404). - Failed webhook (error status): logged when your server responds with an error (for example,
Automation: [My Webhook] -> http connection failure while sending webhook: 404,Not Found). - Failed webhook (exception): logged when the connection fails (for example,
Automation: [My Webhook] -> exception occurred while sending webhook: java.net.SocketTimeoutException: Read timed out). - Retry: logged when a retry is scheduled (for example,
Automation: [My Webhook] -> retrying webhook in 342s (attempt 1)). - Internal errors: severe errors are logged if the entire automation process fails unexpectedly.
The system logs can be found in ActivityInfo’s data directory, generally /opt/activityinfo/logs on Unix platforms, or C:\ActivityInfoData\logs on Windows Server.
When deploying ActivityInfo as a Docker image, you can access the system logs using the following command:
docker logs <container_name_or_id>