16. Triggers
Creates new instances of
Logic Apps
• Runs based on a defined schedule.Recurrence
•Serves as an endpoint that you call via an HTTP Request.Request
•Poll a specified endpoint and check the response in order.HTTP
•APIConnection is a polling trigger that calls Managed
connectors.APIConnection
•Calls out to a specified URL to register and unregister.HTTPWebhook
•Is a webhook trigger that subscribes to a webhook from a
managed connector.
ApiConnection
Webhook
• Debatch an array into separate instances.Split
• Allow only one instance of a Logic App to run at a
timeSingleton
20. Actions
Collections
• Encapsulates a set of actions.
• Can be used for error handling and
compensation.
Scope
• If…Else conditions
• Can be nested
Condition
• Determines which path to take based on
values in case statements
Switch Case
• Iterate over a list of items.ForEach
• Loop until a condition is met.
• Exit criteria can be time or condition.
Until
25. Workflow Patterns
• Use Service Bus to send the metadata
• Use Blob Storage to store the messages
• Include only the necessary metadata in the queue for routing
• Put related actions into a “try” scope
runafter try-scope Failed
• Add error handling actions into “finally” scope with a terminate action
• Use transport that provides ordered delivery (e.g. Service Bus queues)
• Use Singleton workflows
• Remove parallelism from foreach
27. Scalability
• Trigger uses long polling
• For immediate firing *minimum* polling interval should be 30 seconds
• Throttled at 2000 actions/min
• Use multiple Logic Apps sharing connection
• Use multiple connections
• Each Trigger can receive multiple messages in ‘batch’
28. Best Practices
• Allows for reuse
• Resubmit at appropriate granularity
• Increased parallelizability
• Check to see if there’s a built-in function
• Fall back to an Azure Function
• Request triggers are operations on an API
• Allows for vanity names, heterogenous APIs, telemetry, load balancing
• Consistent management of all API endpoints
• Works across VNETS