Managing long running, polling, transactions

Your current approach has one serious issue. Temporal detects activity failures only through timeouts. So if your activity has 10-day timeout, then any intermittent failure, like the activity worker crashing before opening the ticket, would be detected in 10 days. I don’t think this is acceptable.

The best solution would be to have an activity with a short timeout to create a ticket, and then the ticketing system notify workflow through a signal when the ticket is closed.

If notification is not possible then you can have a separate activity that would poll for the result. Here are some options for polling.

1 Like