why an Opensea Clone Script might be your perfect match.pdf
Power Automate/ Flow patterns tips and tricks after 3 years with Doctor Flow
1.
2. Microsoft Power Automate tips &
tricks, best practices after 3 years
Doctor Flow
ShareQL, Belgium
3. Here is our experience after 3 years
and 12 enterprise flow projects…
Agenda
Make IT happy
Know the limitations
Maintainability
Reusability
Master Approvals
Use AI
Learn PowerApps
Learn Power BI
Microsoft Graph
Code fast & scalable
Manage throttling
CDS
4. Watch my Ignite 2019 Orlando sessions
BRK3159
“Become a flow super-hero” (= Flow Advanced-Part 2)
BRK3152
“Energize mission critical enterprise business processes with
Microsoft Flow: patterns, tips and tricks” (= Flow Advanced -Part 1)
5. Office Apps & services MVP
Business Applications MVP
O365 Architect
@sergeluca
ShareQL Brussels
Office365
Flow
Dev
Architecture
Bullshit
Doctor Flow aka “Serge Luca”
9. Business
Layer
Storage
Layer
UI
Layer
Flows
SharePoint lists & Document libraries, SQL, Analysis
Services, Common Data Service…
Communication
LayerExchange
Online
Analytics
Layer
PowerBI
Logging
Layer
Azure
Applications
Insights
SharePoint
Forms
PowerApps
Forms
SharePoint
Views
Search
Power Architecture
10. You give
them your
packages
(.Zip) or
Solutions
updated
They must
create a
Maker/Service
Account
Make IT
Happy
You give
them your
packages
(.Zip) or
Solutions
22. Key Flow
Limitations
No State Machine
Code Reusability
Loops
500 250
actions/flow
Flow Approval
duration : 30 days
Flow duration : 30
days
No guest access
ALM/devops weak
Cannot resume
flow
API Calls limitation
Controller Pattern
5.000 iterations in Do until and 5.000 in Apply to
Each (Premium gives 100.000 in Apply to each)
Create nested flows or raise a support ticket
Use the CDS trigger : “when a record is
updated” (Premium) or Use the Controller
Pattern
Controller Pattern
Requires 1 Office 365 license for each guest
Power Platform Azure Devops Component or
export/unzip/rezip
In the roadmap
500 calls/5 minutes/user + limitation/24h
depending on the license (2.000 calls/user for
O365 license)
25. Boss validates the final document
Secretary Office validates style
Advisors validate content
User Publishes a new “legal” document
State
Machine
State Machine Case 1. Publish a legal document
26. State
Machine
An employee submits a travel expense
The expense must be approved by a First Line
Manager
If the line manager doesn’t react, it must be
escalated to the Big Boss
Minimize the number of human approvals
Do not approve if we reach the max monthly
corporate expense
State Machine Case 2. Submit a travel expense
31. Controller
Launcher flow
Line ManagerVirtual Boss Boss
Normal flow
Service flow
User x
• Approved
• Rejected
• I don’t know
• Timeout
• Cancelled
Listen to reaction
Create
approval
(don’t wait)
Create
approval
(don’t wait)
New Generation
32. New use case
An employee submits a travel expense
The expense must be approved by a First Line
Manager
If the line manager doesn’t react, it must be
escalated to the Big Boss
Minimize the number of human approvals
State Machine Case 2. Submit a travel expense
34. Flow Controller
Pattern and AI Controller
Launcher flow
Line ManagerVirtual Boss Boss
timeout
approved
rejected
timeout
approved
rejected
approved
rejected
I don’t know
Normal flow
Service flow
Case: Approve a travel expense
39. Messages
Elevation of
Privilege
This pattern can be
used for elevation of
privilege but also to
minimize usage of
premium license
Flow Service
Account
Flow Service
Account
PowerApps
Only this one requires premium
Premium
Alex
43. New use case
An employee submits a travel expense
The expense must be approved by a First Line
Manager
If the line manager doesn’t react, it must be
escalated to the Big Boss
Minimize the number of human approvals
Do not approve if we reach the max monthly
corporate expense
State Machine Case 2. Submit a travel expense
45. FLOW
DATA ALERTS
DATA SOURCE
POWER BI
REPORTS &
DASHBOARDS
STREAMING DATA
LIVE
POWERQUERY ON SQL AZURE
Requires Premium
Data On premises
REFRESH DATASET)
Query DATASET including with DAX expressions(in 2019)
POWERQUERY
SCHEDULED
REFRESH
LIVE
DATASET
DATASET
SCHEDULE REFRESH
Doctor Flow & Isabelle Van Campenhoudt, 2019
Flow & PowerBI
46. Conclusions : there is more than that…
• Learn & share
• Make IT happy
• Know the limitations
• Maintainability
• Reusability
• Master Approvals
• Use AI
• Learn PowerApps
• Learn Power BI
• Microsoft Graph
• Code fast & scalable
• Adaptive Cards
• PowerApps Portal
• Common Data Service
• Microsoft Forms
• Azure Functions
• Services Bus
• Azure Event Grid
• Azure API Management
• SQL Azure
• …
Editor's Notes
This is the Pre-Title Screen.
Please do not place any content on this screen.
To add your image, first delete the place holder image as shown in the white box.Then insert your picture and scale it to be bigger than the size of the white box shown.Finally, right click on your image and select ‘Send to back’ – your image should now be framed correctly.
Open source picture: https://unsplash.com/photos/j9PpIy_x4EE
Get my timesheet: https://emea.flow.microsoft.com/manage/environments/Default-892b3446-d5f0-489e-a68d-605c1613aead/flows/edd198fb-15bb-4fce-96f9-25473cc9ce5e
End of demo: 11’ 10’ 10’ 10’
Open gettimesheet maintainable:
Show documentation compose
talk about deployment
Try and catch
Show scope
Show if_debug
Most of the time this is not important
When user interaction is involved this is important :
PowerApps calls flows
Automated flow : ex: create a global counter
End of demo 15’ 15’ 14’ 13’
In error demo, show that the condition block does not fail if value is null, but the switch does (the status is a choice field)
End of demo : 17’ , 19’, 18’ 17’ 16’
End of slide : 21’ 22’ ,21;20’
End of this : 26 27’
End of : 32’,30’,32’,29
Todo : CDS diagram : how to cancel
Controller pattern video 1 : https://www.youtube.com/watch?v=e8Nuswofodw
Controller pattern video 2 :
https://www.youtube.com/watch?v=qSYMC20aDiE
34’ 36’ 35’ 32
Using views instead of tables Instead of traversing from table to table to get your data, expose views where the joins have been made for you. Provided that you’ve correctly indexed your tables, this approach should be very fast, and it will be even faster if you limit the results by using a delegable function that runs on the server. Using stored procedures through a flow for performance The biggest performance improvement that you can make for a PowerApps app that uses Microsoft SQL Server is to call stored procedures from an implementation of Microsoft Flow (that is, a flow). This approach has the added benefit of decoupling your database design from the PowerApps app. Therefore, you can change the underlying table structure without affecting your app. As we’ll explain later, this approach is also more secure. To use this approach in a PowerApps app that already uses the SQL Server connector, you must first completely remove the SQL Server connector from the app. Then create a new SQL Server connector that uses a SQL sign-in that’s restricted to EXECUTE permissions on stored procedures in the database. Finally, in the flow, call the stored procedure, and pass in the parameters from the PowerApps app. For a detailed explanation of how to create the flow and return its results to PowerApps, see Brian Dang’s article, Return an array from a SQL Stored Procedure to PowerApps (Split Method).
This approach has these performance benefits: • The stored procedure will be optimized through a query execution plan. Therefore, data will be returned faster. • Delegable calls become less of an issue, because your stored procedure will be optimized to read or write only pertinent data. • Your optimized flow is now a reusable component. Therefore, it’s available to other makers in the environment for common read and write scenarios.
https://pahandsonlab.blob.core.windows.net/documents/PowerApps%20canvas%20app%20coding%20standards%20and%20guidelines.pdf
Approval antwerpen
Create Team
End of 37’, 37’ 38’ 36’
End of 40’ 40’
Powerquery <> oData
Refresh dataset and query a dataset + reusing the result
https://www.youtube.com/watch?v=Sn3XvkIGBOs&t=401s
To add your image, first delete the place holder image as shown in the white box.Then insert your picture and scale it to be bigger than the size of the white box shown.Finally, right click on your image and select ‘Send to back’ – your image should now be framed correctly.