Can we trigger Azure Logic App on demand? - azure-logic-apps

can I trigger a Logic app on demand??
My requirement is, I am creating an application which will export data from CRM to Redis cache so I want to trigger my logic app on demand.
PS: I am new in Logic Apps

Yes, you could add Schedule Trigger to your logic app. You could refer to this doc, there are detailed description about how to set the recurrence.
Recurrence schedules support interval time,start time, on these days etc settings.
If you still have other questions, please let me know.

Related

How to get notified when a logic app is created

I currently work with a small development team and I would like an email notification to be sent to me upon creation of a new logic app which would then allow me to configure new alerts for each new one to say if logic has experience a failure of some sort. Right now I constantly have to check the logic apps in the portal to see if any new ones have been created as of late. I couldnt find any info on this. Any help would be greatly appreciated.
This can be done by creating an alert on activity logs, you can look at the newly created logic app in your activity log and create an alert. You can also use these alerts to trigger emails https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log
https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-new-alert-rule

Raise an event notification to a specific client when a user is registered/created on Identity Server

I am creating an AdminUI for my users where I set all the permission. As part of the requirements, every time that a user logins on my IdentityServer I need to set some default permissions, but those are handle on my Admin application. Which is the best way to raise an event to let that application that a user was created on the IdentityServer?
The simplest is i think to create a simple WebApi in IdentityServer that returns the latest users and then let the other application poll this API every X seconds. In that way the system is cleanly decoupled. Perhaps expose the data as a a RSS XML document or a JSON list of items.
There is a built in eventing model in IdentityServer that you could use and push notifications to the Admin application. But push is a bit more complicated to get right, especially how to deal with all the failre/error cases.
I's suggest to add a custom event sink to process UserLoginSuccessEvent or any other event you need, here is list of all builtin events. Find their code here.
In the custom sink as suggested in the other answer you can call an API on admin app to inform it about changes.
Here is a sample for custom sink.
I think to keep two applications decoupled you better to setup a service-bus for simple implementation a sub/pub mechanism. when any user complete registration(or any other actions),then as mentioned in another answer handle the events and add message. admin UI should subscribed before to receive these messages with some information to create a user related data.

How to add multiple subscription in Azure Logic app Service bus topic trigger

As I am having a logic app where the trigger is service bus topic subscription. I want to add multiple subscription ("A", "B","C") for the given topic in my logic app service bus topic trigger . Whenever i select topic it only allows me to select single subscription. Is there any way to add multiple subscription from an array or static variables ? if yes then how to add conditions ? I tried using array, but i have to provide the index of the subscription.
I can use multi trigger logic app for all of the subscriptions to achieve what I am looking for, but is there any other way like using some wildcard characters ***** or / or something else which i am not familiar with .
The action supports selecting only one subscription as you have observed.
Multi Trigger Logic App is indeed one way to go about it but note that the designer doesn't support them, and you will be forced to edit only using the code view.
One alternative would be to split your logic app into two
one for your business logic that is triggered by a HTTP request
one (or more) that is triggered by the service bus subscription trigger and calls the first logic app
Another alternative is to leverage the Event Grid Integration in Service Bus, but note that this is currently applicable only for the Premium Tier.
In this approach, the logic app would trigger based on an event message from Event Grid with details of the subscription that has messages ready to process. You would then use the Get messages from a topic subscription action to fetch the messages to process.

How to retrieve "Runs Completed" count of more than one Logic App

I have a bunch of Azure Logic Apps in my architecture and want to figure the cumulative sum of total runs completed in all the Logic Apps in my architecture. So far, I could only configure a single Logic App to the chart but I am wondering if there is a way to get a cumulative count in a single shot.
Any suggestions are much appreciated. Thanks.
For this requirement, we can use Azure Log Analytics workspace.
We need to create a Log Analytics workspace first. Please refer to this tutorial to create it.
Then enable "Log Analytics" when you create the logic app and choose the Log Analytics workspace which we created above.
After that, we can see the running log(include the cumulative sum of total runs completed) in the Log Analytics workspace. We can see them by go to the Log Analytics workspace and click "Workspace summary".
If you have already created many logic apps and do not want to create them again, you can follow the steps below:
Also create the "Log Analytics workspace" as the first solution above.
Then install Logic Apps Management solution in it.
After that, go to your logic app and set the logs to send to Log Analytics.
By the way, the logs in Log Analytics workspace will be a little bit of a delay, so please wait a moment for the logs.(In my test, I wait for more than 25 mins).

How to show audit data in the front end as timeline when user adds,modifies,deletes etc

Single Page Application which is developed in angular JS. I Just wanted to know the audit of the user activity in the front end timeline based on the users interaction with the database.
The database layer is done using HIBERNATE and controller layer with JERSEY Restful web-services. I wants to Audit the user operations on add,modify,delete etc in the UI while interacting with the hibernate.
I have gone through some posts , Some suggests JPA API for hibernate auditing, some suggests Spring DATA to achieve it. I Wanted the audit data to be shown up when user interacts with the system as well as arranging it in the back-end also.
Help me from the best architecture perceptive,flow or road-map to achieve it and also give me some learning tutorials.
Thanks in advance
Based on the assumption that by auditing you mean to be able track the change history that is made to entity rows at the database level, then yes Hibernate has an extension called Hibernate Envers that does this for you.
You can find documentation on Envers here
The jist is that you simply need to annotate your entities with #Audited either at the class level or on a per property level, supply a few configuration parameters at the time you construct either your EntityManagerFactory or SessionFactory and make sure you have the appropriate tables created in your database.
Once the revision tracking has started, you can then easily query for audit changes by using the org.hibernate.envers.AuditReader interface. See the documentation for how to obtain this.

Resources