Overview
This article discusses the PowerAutomate Flows created for the Airport to support their aircraft.
ITS has been asked to support these, so this document should be used to document any support information learned for this process
Target Audience
Solutions Specialist
Access
Service Account: powerautomate@saultcollege.ca
Password: {Keepass}
Connectors and Flows need to be shared with any new users who will be supporting this flow.
Connectors and Flows should be used and managed using the powerautomate@saultcollege account
Any Owner (Previously shared) or by using the Powerautomate@saultcollege account can do this
- Share all Flows and Connectors
- to be added at a later time...
Aircraft Priority Status Sheet Daily Report - Making Changes
Login to Power Automate
- Go to https://make.powerautomate.com/
- Click My Flows
- Click Shared with me (if you are working on a Flow shared with you, but if using the Powerautomate@saultcollege account, then you would use Flows.
Click the Aircraft Priority Status Sheet Daily Report
In the menu bar, click Edit
You will now see the entire flow
Updating the Recurrence of the daily report
Click the first entry - Reocurrence
From here you can set the Interval and Frequency and Advance Options
Advanced Options
You can change these setting as needed.
Updating users that receive the daily report
NOTE: to do these steps you will need to have been assign permissions to the necessary flow
Click the last entry - Send an email (V2)
Enter or remove email addresses in the To field
Make sure to click SAVE when done
Adding new planes to the system (Model exists)
Access the Microsoft list that supports the report
https://saultcollege.sharepoint.com/sites/AircraftMaintenanceStaff413
Click AC_Setup in the left pane, this will open the Microsoft List
Make sure:
- Don't touch this documents unless requested by AirCraft Maintenance Engineer or Manager at the airport
- The Aircraft has been added to the Talon system first, and all fields have been populated in that system (Aircraft Maintenance Engineer's (AME) responsibility)
- Get up-to-date information to add to these fields
- Make sure to get the most up to date information for the planes from the AME, that is the same as Talon. The data must be accurate, before signing off on an update.
- If the data isn't accurate the Power Automate scripts will produce errors.
- Data between Talon and this SharePoint (ac_setup) list has to be exactly the same. Any deviation causes errors.
Example of the format we need to request before making any changes:
Aircraft: ####
Priority: #
Last Run: {date}
Days not run: #
TotalTime (which is Total airtime): {1 decimal format} ####.#
Next due: {1 decimal format} ####.#
next cal due: {date in the format of yyyy-mm-dd}
WA Hours: ####.# (Same as TotalTime}
Model: ####
Testing new planes additions
Login to https://make.powerautomate.com with the PowerAutomate Account (powerautomate@saultcollege.ca)
Re-Run all Flow or wait for the scheduled time.
If the Aircraft Priority Status Sheet Daily Report runs, then an email will be sent to those configured to receive the emails. This can be modified as needed in the Aircraft Priority Status Sheet Daily Report script.
NOTE: To add yourself, see Updating users that receive the daily report instructions above
Adding a new Airplane Model
We had considerable issues when adding a new plane model and Enterprise Development work on it to a solution. Mike Blanchard was lead.
He told me that he changed the {Older logic of the} 'if else' condition to a 'switch' statement for each aircraft template. The reason the SR20's were not updating is because the counter variables are different for each model in WinAir.
Z242L > Airtime (hours) + Landing
PA44-180 > Airtime (hours) + Heater Hobbs
SR20 > Airtime (hours) + Cycles
All template counters need to be included when doing an API flight log insert for the specified aircraft in WinAir. This is why we are sending XML data to WinAir for Heater Hobbs and Cycles but setting each to 0 as maintenance staff will update these values manually but still need to be included anyways.
If a new aircraft type is added a new template should be created in WinAir (reference doc) and this flow should have another switch statement for the new plane and include the correct counters. Like this:
Microsoft Licensing
In order to use the 3rd part Flow Connectors, such as Talon and Winair a Premium Power Automate licenses has be be maintained and applied to the account running the Flows.
Microsoft started to enforce Premium Licenses for 3rd Party connectors and we never received a notification around on Feb 23, 2023
Account to apply the license to - powerautomate@saultcollege.ca
License that needs to be purchased/maintained on a yearly renewal - PowerAutomateplanEDU ShrdSvr ALNG SubsVL MVL PerUsr
NOTE: This license needs to be purchased yearly as we can also use the Powerautomate@saultcollege.ca for any ITS related activities.
As of 2023 we have 3 of these Licenses Purchased.
Troubleshooting
April 2023
The SessionID from Talon rolled from 6 digits to 7 digits. The PowerShell Flow isn't smart enough to know this.
SOLUTION: Include the extra digit so it allows the FLOW to pull the report being requested.
Power Automate goes to Talon and retrieves the Flight logs, then passes this data to SessionID.
SessionID then goes through the data pull in search of the actual SessionID, via the below command
COMMAND: replace(substring(body('Get_talon_flight_logs'),indexOf(body('Get_talon_flight_logs'),'session1'),15),'session1=','')
- The command, searches for 'session1' within the output of the Get_talon_flight_logs action
- Removes the 'session1=' prefix from the following 15 characters (if it exists).
- The resulting string is the output of this expression.
However, you will notice, that the Talon Flight Log (as seen below) has a 7 digit Session ID and not a six digit number. I retrieved the 6 digit number I used for the below search from a failed run log and then I could see that one number was missing.
Note: above is a snip of the data the REPLACE command parses
So, to solve the issue we need to update the command to now pull 16 characters, which then will allow us to grab the extra digit.
NOTE: You can also see that the number of SessionIDs appears to have rolled to 1 million recently, since it is 1,027,555 which re-enforced this observation.
The next time this problem will occur will be when the Session IDs role to 10,000,000.
NEW COMMAND: replace(substring(body('Get_talon_flight_logs'),indexOf(body('Get_talon_flight_logs'),'session1'),16),'session1=','')