What a resubmit for ?
Either working with Biztalk or Azure Logic apps, the possibility to resubmit requests always have been a great feature. It’s the kind of feature that can make a customer happy. That’s the ability to process again a query. It’s often usefull to retry something what has ended with an exception, however, it can also be done to resubmit a request which has successfully terminated.
It’s a great feature, that is said, but it’s shortly something really complicated to design either to developp.
How Azure logic apps might help ?
As each flow can bring it’s own business rules, technical constraints, requirements… there is no universal rule which work with all of the process’. It’s doable using Microsoft Biztalk Server, however it means a lot of work to cover different cases because we will have to handle many cases, and each new flow can have new rules which means more work on it.
What is so different with Azure logic apps ? The fact is, Azure Logic apps brings it’s own, native, resubmit feature. It might not be suitable for all scenarios, however it’s a feature that can help in many cases.
Overview of Azure logic apps resubmit feature
How to resubmit ?
Any run of an Azure logic apps can be replayed using the resubmit function. The resubmit feature is avaible through Azure Portal. Simply locate the resubmit command on the top of the run detail window.
If you need the end users to resubmit tasks, i admit azure portal might not be an option. Using Azure logic apps API might be helpfull if you want to integrate the feature in your own portal or tool. Azure opens the features of logic through REST APIs. For more inputs on how to call the Azure Logic app resubmit API check the following link : Logic apps resubmit API.
How it works ?
If you are familiar with Azure portal, you already noticed that each run of logic apps are available. It means that for each logic app run almost everything is saved somewhere, including input and outputs data. Concerning the resubmit action, the important thing is that the trigger output data are used to replay the action : the logic doesn’t replay the trigger. So, for instance, if you have a trigger like a “FTP – When a file is added”, then, the resubmit action will not check back the FTP folder. Instead, it will run back the file red first time.
Consideration about the native resubmit feature
Resubmit action is very usefull during development step. It’s however can’t be used on all the scenario in production environment, but still, it’s really a great feature. Last things you should consider about the logic apps resubmit feature :
- In my experience, there is no native way to know you are running in a resubmit context. if you need to know it’s the not the first time you are running a process, then you will have to implement your own way to identify you are running a resubmit context
- The default retention delay is at 90 days. So after that delay, you can’t resubmit a logic app run (except if you contact Microsoft to get more retention)
- If you implementing the singleton pattern on a particular logic app, be warned, the resubmit action doesn’t respect the pattern, it runs if you have or not an already running instance of the same logic app