Hi,
I have a very open ended question here. I am trying to model a step in temporal which does the following:
- Poll external service and get response
- Persist the response in a database
- Retry the above steps in sequence until the status field obtained in the response matches a value.
I was thinking of modeling an activity for this, but I have some open questions:
- How can I configure my activity to retry when there is no failure ? Eg. I want to retry until status field in response is ‘xyz’.
- Should I model this in a way such that both polling and persisting the response is part of same activity OR should i ideally create multiple activities - one for polling and other for persisting the response ?
- Can I use workflow sleep to retry and practically just use activities for polling response and persisting in db ?