This code works fine for the current scenario. My problem is that I cannot have uploadSignature and submitSignature throw Exceptions because Async.procedure call gives compile errors. But then I have no way to allow the two activities to automatically retry execution in case there are Exceptions or unsuccessful calls.
I wanted to check if there is a way I can call them asynchronously like I do right now while being able to let the activities retry themselves if they don’t succeed right away. Any kind of help is much appreciated, thanks in advance!
You can throw exceptions from activities. You cannot specify checked exceptions in the activity signatures. So your options are to throw unchecked exceptions or wrap checked exceptions using Activity .wrap.
I hope this looks better, and just wanted to confirm, would this ensure that uploadSignature is always called before submitSignature, because the workflow would fail if it tries to submitSignature before it is uploaded. If not, is there any way for me to ensure the order?