Delayed Task and Expiry Tasks timing is not correct if the interval is smaller 60 seconds
Hi Axon.ivy Team,
In our project, we have several use cases that we would like to use the Delayed Tasks or Expiry Tasks. Depends on the business needs, our delayed or expiration duration **may be 30 seconds or less**.
However, we discovered that the duration **does not work** if it is smaller than 60 seconds. I had done our homework a little bit and discovered that the `WorkflowJob` which was the main module used to resolve expired or delayed tasks is scheduled to run periodically on every 60 seconds. This was done in `WorkflowManager`.
I assumed this was done _by design_ but it took me by surprise because I could not find anywhere mentioning this limitation. The interval, 60 seconds, is hardcoded and is not configurable like the `SystemTask.SearchJob.Interval`.
Is there any recommended ways to overcome this limitation?
**UPDATE**
In our system, we want to communicate to a 3rd party system, namely ABC, via its RESTful API.
- The process starts when a User triggers a designated action on the UI. We then call the ABC's API to initiate a process on their system.
- Our system then have to poll ABC's API for result **asynchronously**.
- The ABC API requires that we have to poll for result at least after 30 seconds from the time the first request has been sent.
- We want to have at max 3 attempts to call ABC's API for checking the result. Each time will have an additional delay of 10 seconds.
- At the same time, the User UI may be also polling for the result. It is not required that they have to keep the UI open.
Having the above requirements, we are using Signal to trigger the polling to ABC's API asynchronously. The Signal process makes uses of SYSTEM TaskElement whose DelayDuration set to `30S`. For triggering a retry, the process itself then send a new Signal with an additional delay duration.
What would be your suggestion to implement such a use case then?
Bump this up!
Regard
Jack