Might be totally off on this but the current Signal*
system in Temporal works in a fire-and-forget way.
Also there might be an overlap/misunderstanding on when to use signals/async complete activities.
I’ll layout a generic scenario below;
- user submits email address in a form → OTP is generated + Start Workflow execution
- user is sent an SMS with OTP
this can fail - if it fails internally temporal will retry
if it passes but user doesn’t receive SMS because operator felt like not sending it - we want the user to be able to request it again - first signal – with help of Maxim I was able to figure this out. this signal can be fire and forget.
- user receives OTP and enters OTP
- second signal – when we receive this signal the next activity is to verify the OTP. there’s no point in retrying if this fails because it’s user error - so lets say we detect this; we can’t get a hold of the response from the activity and send back to the user.
we want to get the result of the activity, if it fails respond back to the user and say wrong OTP and then allow them to request a new OTP (first signal) and then enter the OTP again (second signal).
this usecase also won’t work with async complete activity