logo

NJP

Update Set Automation via IntegrationHub - Live Coding Happy Hour for 2020-11-13

Import · Nov 14, 2020 · video

[Music] hello and welcome to live coding happy hour on this fabulous november 13th 2020. it's friday the 13th did you know it's friday the 13th i did i think i just found out oh i'm your host andrew barnes along here with uh some awesome people um let's drive right into introductions and we'll start as usual with brad hey everybody brad tilton here i'm a developer advocate with the developer program here at servicenow i've been developing on servicenow for about 12 years and been an employee for the last four awesome thanks brad and returning but special guest jared hey everybody i'm jared montz i'm a security and integration engineer at clear sky inc awesome and uh tell us a little more jared give us give us just a little more taste a little more i've been at uh implementation partners now i'm at a product partner uh before that adds a couple of different customers of servicenow for the past uh i don't know six or years however along uh calgary uh came out and now yeah focusing 100 of my time on servicenow store applications uh around identity management uh governance administration things like that awesome we're delighted to have you here and i'm andrew barnes also developer advocate here at servicenow two years into this role been working as an implementation partner like jared in fact we were at the same implementation partner uh back when uh and a couple of customers and now it's servicenow i've been doing this for a little over six years and excited to be here with y'all today let us introduce our beverages of choice in the same order all right well today i have it is a guinness imperial stout that has been barrel aged uh so it's from the there's a guinness brewery in baltimore apparently uh and it was just a random thing i saw at the store and was like that would make a good life coat happy hour beer i i think brad doesn't pick the beers for him he picks them to make me jealous what do you have jared well as you know i'm not a fan of wine or beer so um i was thinking about veterans day this week and my first base was in germany and we drank quite a bit of sparkling carol steiner um while in germany so happy veterans day uh week to you andrew i know we were didn't know each other in the military but it also had some overlap in the u.s air force and to use her and i have beer for tacos awesome because kind of beer is it uh i i don't know but it said beer for tacos and i was like i'm on board let's have this it is a oh it's a gosa oh with a white lime juice or no with lime juice it's a it's a gosa apparently yay i'm excited now um and i'll apparently have tacos too because you can't have beer for tacos and not have tacos so that's true so um welcome everybody uh this is live coding happy hour where we do uh you know unscripted servicenow development live here on the show uh so this is in a pre-canned demo um while we have done things uh previously that uh you know uh you know we might have some experience with um we're always trying out and showing something new on the show um we have a guest obviously today and he will actually be driving uh and showing us what he has uh been working on and and uh presumably we're going to enhance some today uh so why don't you tell us what we're gonna do today jared yeah um so at clear sky i'm uh working on our flagship application but also improving our devops process and just trying to standardize some things you know things um decode reviews code migration from dev to test to qa up to the tpp instance to publish the store but also to an internal app repo and so we do have pretty much all of the the servicenow platform moving parts currently in our devops process and so over time we will mature that but for now we still need to move some update sets between instances and and also um all the things that the current the icd-spoke is good at like publishing to the app repo um and uh publishing the source control and things like that so um i thought back once we got to this step um i remembered that about two and a half years ago i had uh kind of reverse engineered a part of the update sets process within the the platform uh made my own this script include and used it for uh just uh a few few things a couple years ago um but never got to the point of publishing it to open source it never made it out to share it's just kind of just been sitting in the closet since then so i thought now would be a good time to dust it off probably wrap it or migrate portions of it into flow designer and then once it's in flow designer we can grab on to any of the integration hubs folks we want to we can throw an update set up to github get lab dropbox whatever and uh it doesn't have to be just specifically for ci cd it could be we just want to back up our update sets off of our instance once a night out of dev right accidents happened and we don't want to have to fill out a high ticket just to get back some code so uh yeah it's not specifically for ci cd but it but yeah we'll we'll be looking at exporting update sets into a xml stream file and then the sky's the limit we can send that string anywhere wherever wherever we want so hilariously you and i have done duplicative work in this area more than once [Laughter] because uh you know we've both seen a need to do automation around uh like you said backing up update sets i know both of us have built that before and moving them between instances both of us have done that i think i've done that like four times now uh and then uh being able to uh you know just store it anywhere or just get it in and out quickly load stuff i know you did some uh some interesting things with you know quickly getting uh stuff into and out of uh an instance um so there's all kinds of uh implications um with this and uh as you said eventually our maturity will be such that we'll be able to use uh source control um and not have to rely on update sets but we're still we're still working through um all of that uh you know enough people have to be on for example paris um to to access that for global apps um but uh but we're moving towards that and any updates at automation will help uh you know raise that maturity law uh level four teams and also help them you know sort of get uh closer to uh being able to use source control um and and use similar actions on on those those two different things so i'm excited um is there anything else that we need to cover i want to cover brad's shirt because i don't have mine yet brad got his hacktoberfest shirt uh so october was hacktoberfest um if you were able to participate that's awesome i know we had uh some pretty pretty great participation um in our repos um brad and i were acting as maintainers uh for several repositories um and that was a lot of fun and but that doesn't mean you have to stop contributing to open source stuff um so keep keep finding projects that you want to engage with and it can be as little as just identifying or in replicating bugs for them like go to their issue list and validate some bugs and then you know say that it's a validated bug and how you validate it is a thing that can help a developer so you don't even have to be a developer to contribute to open source development there's a lot of things around building and deploying applications that aren't specific to a developer actually doing development so tons of stuff like that that you can participate in so uh let us go ahead and screen share and get rolling because uh we could do some live coding now we are on the clock all right so let's take a look um at this so i guess before we get started we can talk about a couple i'll give you a quick demo of what we're looking at i was part of a larger update set so i grabbed out the relevant functions to a temporary global script include and so just for the the conversation today we'll probably be creating some flows and sub-flows maybe some action um where do we want to store this um this we see um and if you'd like me to to go quick into where i found some of this stuff in the servicenow instance um we can take a little tangent there otherwise we can jump right in but i think we can jump right in but the the point is uh it has to be in global because we are looking at some packages some stream things some glide record xml serializer and just a variety of things like that so do we want to just do this in a regular update set do we want to make a a global scope and put the script included into studio and all of our flow things into that global scope me i vote for global scope app brad i do think it will make it more smooth for us if we do a globally scoped app and then we can take advantage of source control automation [Laughter] perfect yep and and just for for the audience um everything that we're doing here today i do plan on open sourcing and publishing out on share it we'll have a related github repo where we can improve on it as we can see this is just code i haven't touched since um 2018 have a lot of i guess higher standards at this point where i'd want to return an object and and not just a you know a glide record in one case and a string in a different case but uh you know but let's talk at the high level architecture first and then we can uh refactor things if there's time so awesome you're brave i always when i go back and look at older code i'm always ashamed of myself i don't know that i would do it live on it we're always looking at our old code brad uh yeah um so one thing to note is there is a system proper so um when you created this app um you chose the global option and that is only available if you've set a property uh in your instance um which a quick google search can return you and we'll put in the uh description below in the youtube video for later but there isn't property that controls whether or not that is visible and by default it is not so naming things is 50 of the development process yeah i filled plenty of air while you were naming it uh we can migrate we can uh rename this later if we have uh feelings on the subject but let's start okay yeah we created an app now we can open it in studio so i will copy create a new script why are you creating a new script include can i i've never just migrated you can you can pull this in yeah so claim it in studio you claim it great uh all right i came here to talk file and add existing files and you can do this from an update set or individual files so if you already had an update set that it was bundled into you can just pick it from there don't okay so then you do search by okay excellent there you go now that file that app file is associated and visible in studio and would ship with this as you uh publish it to source control or wherever wherever you're moving it excellent so that works for anything that's in global that's unattached or could i pull it from one global scope to another's mobile scope you can uh pull it from one global scope to another global scope and so i that is part of um part of the paris features is a claiming process so that it's always deterministic on which item uh update for a global scoped app is the right one that's on developer.servicenow.com blog how about updates at pac update said pack i love it yeah it's a script include that doesn't have the word utility in it i'm on board and i'm assuming that we will want this to be accessible across all applications potentially so i so i'm getting on board with the flow designer integration hub crowd uh i'm i haven't been thinking flow first for very long and so uh that's what i was hoping to uh to get some advice on today is is um well well fortunately you've got two of the flow uh i was gonna say flow kings but that just doesn't roll off the tongue very well but yeah we we are definitely uh uh flow uh friendly here oh yeah we're full advocate yeah upside down andrew uh you know coin coin that term and we can use it i'm a fan we can so we'll go over the the high level thoughts would be let's in a flow uh we'll have two different i don't know how the flows and cell flows will act but we will have one thing to export or we would say go through all the complete update sets or go through all the in process update sets or maybe just anything that's not ignore and put it into a text file and push it out to github uh okay and so are you looking to make an action out of your script include or multiple actions out of your script include yeah that's that's that's some of the secret sauce today so let's let's call uh do we want to start this i think the just routine backup update set use case is is easier um to talk about let's do that one [Music] and i will suggest actually uh well yeah i i'm gonna suggest it let's start from a subflow so i was gonna say something if you didn't we'll build our logic for what we're gonna do in our subflow and then we'll build our flow to trigger it potentially or it could be other things but if it's in a subflow that allows us to invoke it from pretty much anywhere and with inputs and outputs so the subflow will assume is executing once per update set or that that's a design decision [Laughter] so can we i may have missed this this uh the problem we're solving now is running through all of the active update sets and exporting them yeah let's let's uh right and so your subflow could potentially do that part or it could just do one and your flow actually like calls the subfloor multiple times so it's it's whether or not we want it to be a uh individual thing a backup one or backup all um and if we want to the functionality to back up one or two or three update sets versus all of them then we probably want the subflow to handle just one at a time and pass it which one i wanted to do yes so if we're doing this in pure code we would look something like this where we would have our local update set okay so we're going to export that update set which just like the ui action takes a local update set copies it over to a retrieved update set and then the next step is to get the text from that update set and that's really where the the secret sauce and the script include lies uh it's getting the right order of all those different xml streaming commands to line up so that what comes out on the other side is readable and importable so let's look at this quick example again executing in global uh the things we're doing won't won't work in scope but on the other side we have a string that is our update set um okay and then so this ball of text is is what we want to pass off to integration hub and have it uh do something with it again sky's the limit that's the we don't have to go down that that path but in code this is what we're doing so the equivalent inside of our subflow i think we could probably just copy and paste this into a script inside the subflow but that's not very elegant and would be hard to troubleshoot later on yeah that that calls for that i mean this this process which what we're seeing here in in flow land is an action so this is take as an input um which updates that i want to do something too and the output is a string that is the xml of my update set excellent and would we leave all this in our script include and just call it from our action or would we copy and paste the the code here into our action and have the action standalone and not need the script included um since you already have this script include i would just call the script include yeah i wouldn't refactor it into uh you know like get record queries and things like that in uh because it's already done like yeah i think if you're doing this from scratch you might consider like doing it natively within an action but maybe to do it in a script including mostly yeah being familiar with what's in that script include i i'll say it's still gonna need to be script and then therefore it can just live in a script include and i'll just call it from my action because i'll never be able to abstract out enough of that to make it a visually understandable um outside of script in flow designer like it it's going to be a script box and so it might as well be in a script include and the nice thing about if you were to do this in an action where you put in a an update set id and then you get back the text from the xml i mean you can call that from a script too so that would be a way that you know you can front end your script include so uh you you want to create a script step yeah and have you set an input to your action yet i don't think you did so let's go ahead and do that so you'll need to collapse the right hand pane so you get the uh add inputs there you go all right so right now we uh as it's written without any refactoring we are expecting a glide record of the local updates app okay so we so that is a reference field then essentially so it's a reference of local update set and let's see if we don't even let us pick that which probably won't yeah we might have to pass in a society instead uh so there's two ways to solve this i don't care which one we do so you could just pass an assist id and then we can go get the glide record object or we can set this to something here in flow and then we can go to the table and change it all right um that sounds like fun i'll probably experiment with that offline later on let's go with the the society option okay and i'm assuming mandatory and mandatory seems reasonable now do you actually pla pass it you do you pass your script to include the whole glad record or just the society so yeah and right now there's not a single the way it's factored there's not a single function being called first we trigger the local to retreat uh retrieve that data then we get the updates that uh the text from there so yeah the start of it is is uh of records yeah so we need to we'll need to instantiate the cloud record in our interaction okay so local uh instead of typing update set constantly i'll just start calling him set and and you can give it a default value there if you have a sys id of an update set that you want to test with then we don't have to copy one and test it yeah let's let's do that let's call this uh weaver toolkit which is another thing that i've published recently out on servicenow share got some fun features for your local development instance so let's so prior to publishing we'll come in here and blank that out but we'll use that for today yeah i like doing that for my testing is just have a default value and then strip it out later once i'm done building the thing i piped in with that because andrew always reminds me to do it whenever we're doing something like this i stole it from him that's his thing i i i like to make my life as a developer easier which is why i automated the updates at moving so many times so the few times i've done this in the past um i've come in here and converted that input variable to a input variable on the script step that is correct and then here yep and then in here you'll uh do inputs dot that name you set so local set id um once you want to access that which will probably be the first thing we do which is turn that into a glide record object yeah so using our little shortcut to get a glide record object really quickly i like it well and i i yeah you noticed i did try to do uh bar gr tab and yeah you did notice that over in here uh i'm a fan we're we're exp adding that and some of the the eslint features of the built-in script editors uh so so i was just checking to see if those are enforced over on this side so i will i i can tell you that uh there there will be only one script box eventually and it may appear to look a little different in different sizes and formats but they'll all work the same um so that that is coming to a flow script editor box uh near you in the future yeah my most used feature though is the shift tab alignment oh yeah so i'm glad to see that i love that one [Music] so i'll take what i did over in explore and just um okay do that now we have this which i'm guessing will turn into an output now is there anything that you want to do so i think that that is a good enough uh for a singular action um but it there are is potential to if you wanted to do another parsing of that before you pass it along for consumption for the next step um i don't i don't think that's the case here but um that is uh something that we can do so yeah outputs nice looking good it's a string and now we just need to set the actions outputs to be from our script step output so this should be a friendly name for a user and then uh setting things mandatory on output what are you is that i i don't i don't think it does anything for me okay so uh if you hit exit edit mode you'll be able to drop the data pill in there now and i believe we're at a savable and testable state yeah saved tested completed and on the runtime i have an output all right let's click it that looks like what we were going for nice i'm going to call that a win so that's our action so now we can decide how we want to consume that action so if the first thing we want to do is um do you want to do uh back up all of our up let's let's solve a use case which is back up all of my update sets so that should mean that i need to get a string for a bunch of them do when you're doing that do you string all of them together or do you act on them independently so my my first thought is they would be independent um to include the subflow being just a single update set that way in the future if i wanted to just throw a single update set out to github i could trigger that through a ui action or some individual process and then if i wanted to export all of them then i could run that in a flow and loop through that subflow for each one okay so uh we probably need to build the send it somewhere part right yes because we can get our string in our flow but then then then we gotta move to the next step which is create so important you know for today do we want to just create a uh predend github uh or oh github i mean upload i don't why don't you just install the github spoke and do a real github i can do that is that something i need to uh go with a high-end request or is that a local plug-in it's it's a store plug-in but you should be able to install it right from your instance so if you go to plugins but the app manager yeah plugins just plugins yeah which will get you the app manager there's a better module name for it but i just go to plugins because you know all of us have been doing this a while we're used to going to plugins so i think we'll have to do we'll have to do the github upload for each update set right because there's no way to like loop through and return so yeah install that um right when we loop through we have to do something in that iteration yeah so inside of the loop we would have to send the string we have right then to github so while that's going on let's go ahead and build our let's do our logic for that looping in the top level flow in the in the subflow sub flow okay we'll do a we'll accept a string a array of cis ids right and then we will for each of those we'll uh do a lookup um that get local update and then then we'll push them to github all right let's see if we can find our update set package spoke get local update set all right that will be there when we need it so do we want to apply some looping logic to that first yes so we want to do a like a lookup so do we want to pass this flow records like we could just pass the cis ids and then loop over the societies so we pass it it from the inputs the array of societies right is that what you were thinking brad i saw you had a thought yeah i don't know i mean we could just loop through update sets from here maybe you could pass like what your parameters are for your loop but yeah i mean it's it's whatever let's look through the updates let's solve this subflow does let's do this subflow does all the uh closed ones or all the open ones or something some questions i was envisioning like we we kicked this off from like maybe there's a ui action somewhere where it's like hey i want to push all this stuff now maybe we trigger it once a day also uh and so we trigger this subflow from multiple places so yeah let's do a look up records and then we'll probably run into it won't let us have the update set table here that's what i'm guessing oh so we we're gonna need to script that let's script it all right so use the fx and set the table to the table return our local updates at table name i mean the fact that that is available is nice you know i it would have probably taken me a minute to figure that one out so um and hit the collapse not the fx that's right need it to still be green on the other side yeah you green or it won't execute [Laughter] and then uh we'll have to script the conditions because it can't build a condition builder off of a scripted um and so we want to do like uh state is complete let's just let's just start from that let's uh i'm gonna oh i'm narrowing it down i love it yep i'm in a sandbox and so one other thing i i'm uh i'm not sure um how the compatible this is with updates at batches at the moment so that's another consideration um to filter out parent is empty yeah so i'll grab that real quick looks like pretty harmless stuff in here so jared being uh of sound body and mind uh does what i do which is goes to a list view builds the query wants make sure it has the results he wants then he puts it in script and abstracts it if he needs afterwards and i would order a tip right there don't want to script that one yeah yeah all right uh so that'll give us a bunch of records [Music] and nice do you limit that um usually i've been doing a quick list um lowering this down i like lowering things down for testing absolutely you can make it two just to show that it does you know the looping um so now we need uh under lookup records we need to add the flow logic so we need to drag this up or that one down yep there you go boop and we need to give the for each a the data pill yep from step one so step two needs a data point yes yes records yep uh hit save there now it's not grayed out anymore nope i guess i can get it that way this was a bit grayed out yeah he wants you to save [Laughter] i'm getting nervous this is the nuances of that uh that you veteran advocates um no yeah is uh especially when you move them around it it uh gets a little confused so now we're going to yep get the individual record which will be the society of those records it doesn't want to let you pick it but uh you know use the the cannonball um because we scripted it maybe oh cause it's a gooey but it doesn't know that's a gui yeah so we need to tell it that's a gui or just change your input just change your input on the get local update action so up in the tab there so you specify that it's a a you know society but we don't it could just be a string there there's a way to tell it that it's a cis id and the other one with the function transforms but uh we're not here for that today nope this is the proof of concept v1 and so now uh you should be able to uh put it maybe though yeah yeah you may need to do a save and a refresh uh it should it should refresh it here now that it's we'll accept uh uncheck the fx and try the cannonball no okay uh we'll uh close flow designer and relaunch it oh did you publish the other one i published the action i haven't published yeah yeah so just close flow designer and relaunch it that should solve it all right looks like our github is 100 complete allegedly when the bar gets to uh this point that means 100 [Laughter] our scale is 105. so it's not a big deal that is just like flow designer to give 110 that's something dave probably added um after getting over there no i just wonder if since we scripted the table maybe flow designer can't actually grab the values from the table fields um potentially yeah cause this looks happy um right because it looks like that record is just a like it doesn't know what what's associated with the record so maybe if we hit test and see what happens see what step one is coming i think it'll work it just bad request at request all right um maybe uh it doesn't accept the table name but instead accepts the table society for the scripted table field so under look up records the scripted uh table maybe it accepts the cis id and not the table name and the fx for a table go back to the uh cisdb object yeah society having never used a script step on a look up records um yeah yeah i have not either i'm wondering if that's like even it doesn't actually but it shouldn't be there if it's not supported so it's my vote okay still grayed out counts available that's not helpful but so flow design is not broken it's just uh not happy with that can we even run a test just without the without trying to use the lookup records just see what it returns yeah let's put that default what test do you want to run brad oh i want to test the flow and see what happens see what shows up and then yeah i think it's going to throw an error on there but you didn't hit save oh i need save and then test yeah i don't my my belief is it doesn't actually uh non-existent table all right well we'll try it with the other thing did it actually perform your action though oh well it threw an error so it won't do anything step one yeah so let's give it the table name i guess which you politely kept in there and just commented it's so nice it's so nice to to be with people who have done things before i've been done before okay it looks like it found three records found three found three records it just doesn't want to pass them into the uh um yeah and here it's just using that test hard-coded tell you what just add in any other action and see if you can get the inputs from record for that and rule out whether it's your action or do like update record or something creator updates and try and pass it in maybe no i think i want to just update yeah all right that's not does not want that one either so it works it just doesn't want to use the data pills all right well then hey you want to be sneaky let's do it so in your lookup records unscripted so pick any old table don't care which one so we've been talking about csdm foundational data a lot lately so i'm gonna go over to good old common location and and so now uh you should have a data pill that you can drag into your for each you're going to have to oh it it that's why it won't it's going to remove that when you change the table name to be scripted the data pill will go away so no we can't cheat it we can't cheat death um so that means we need to do this in our we need to to do this either super hacky or in an inaction yeah i think we probably want to do it in an action okay are we getting a little look behind the scenes of why this might not have been just built in what box the reason it's uh so flow designer is not meant to be a tool to do platform itself automation it's meant to do automation on the platform but it's not meant to automate the platform itself and so a lot of system tables are not available to you here in flow designer because that's not the general audience uh for what it's for we as developers uh like to make it you know do what we wanted to do but uh the intent behind it wasn't for that and for the stuff that it like does do automating the platform like our ci cd spoke and those types of things like that's all in like integration of spokes and actions and subflows yep and it they're just calling apis that are that are so the uh you know publish to uh repository spoke is really just calling an api on your instance so uh we need to make an action so one other thing but we're running up on uh time it's true so what were you gonna say sir i was gonna say the other the other part of troubleshooting it was maybe do the looping in the flow and and then pass the happy uh the loop the string into the action yeah yeah i have the kind of how i was saying to do that to the subflow but instead moving that down to the action right have the the action except a string or an array of cis ids yeah absolutely that is the solution i think yes uh so hit cancel here so it's your yeah yeah and go to your action and let's do that because we can do that pretty quickly so in your inputs no it's i mean it's already a string so that part's fine in our script step we just need to uh break it into an array and loop through it so how are you going to pass the an array of strings of sys how are you going to get the array of cis ids oh yeah that needs you're right i need the script step to do that yeah you just need to tell the action like hey i want you to loop through the flows i mean maybe the action input could i don't know yeah i mean we could script the action input yeah but you need to do that in all in the action since you can't do the lookup records from the flow or subflow yeah hmm we do have a comment that says you can add the uh glide ui permitted tables options uh in sys properties so you can go in and manipulate i believe that was going to be the hacky option um you know we could go in and change some of the properties so that those tables do show up in flow designer but that's not uh especially if this is something that like you know jared's going to put out on share that we can distribute that's not something you're going to want every customer to go in and change the properties on our tables i think that that would ship fine though actually now now that i think about it i think it ships fine you don't ship the property once the once it uh has the table in the the flow or subflow or action oh so that's control property yeah the property would just it it controls the filtered list but you don't care about that because you're not the value's already there the value's there when you're shipping it is interesting so yeah you want to do that real quick we could take we could do that um and that that keeps us from going too off of reservation um you want to go set that property jared yeah absolutely i've sent it in the zoom chat so shout out to the uh the white space ui 16 fix when i just right click on the bar here and go directly to properties that's a good uh that's a good thing to include yeah at the end andrew oh i'd like to show you the the filtering of the top uh application drop-down list that'll be fine yeah i'm willing to go a little over for fun all right again and uh you should probably just go ahead and throw in the remote table one too the the remote update set table while you're in there because why not i'm here already they're closely related friends and then you're definitely going to need a flow designer to do a full reload so you're going to just have to close flow designer i think you could just refresh but i'm not going to argue with andrew if he tells you to close the tab i think we've established that i need to listen to him on that on the show all right load back our subflow this update set is now present there you go thank you to our youtube comments yeah so i think the thing to check on this will be if you do uh like export this flow and import it into an instance that doesn't have that property set does it work which i think it probably will but i'm not 100 convinced the youtube comments are what really makes us want to do the show live because y'all are the best so thank you for helping us uh because it makes us even more fun all right and helpful hey look we can pick data pills it's the best all right so just personal preference would you go down and grab society or would you drag it i grabbed this id because i like to make it very clear what i'm what i'm sending over and then here is there any glide element business we need to worry about do it to a string or just call again all right looks like we have xml for step one all right is that xml different yeah slightly yes yep yes we have one second right different between them i i felt i feel like this is the smell of victory so we've got the string now i think so so at least let's stub in our github action it's not going to work because we haven't set up credentials but what's available right yeah yeah and i i have not obviously activated this plug-in or played with it yet so create or update yep so we're going to create or update a file yeah is exactly what we're going to want to do so potentially what you're going to want to do is like look up a repo or something but for this purpose we're going to assume you know all these things and so into path we could uh we and we might want to return well actually we'd want to get data from the update set and like use that as part of the path name right exactly we could even use like the scope as part of the path so let's go back in there and do applications i'll only let you have one it looked like i think that was it scrolled it how cool it does nice and i'll just say plus and the content will be our xml stream yeah and uh i'm author info yeah we could yeah so so that that looks like uh pretty awesome uh like once we set up our credentials we'd be done in just a couple more minutes from that so this is looking pretty great um but we don't want to we don't we don't want to do uh credentialing because there's we're one minute over and credentialing takes more than one minute overing time [Laughter] exactly we've done whole shows on getting github credentialing done correctly though with the spoke uh it is actually quite a bit easier um so when you do go to set this up jared um there in fact uh give us a g uh go back to the home tab in flow designer and i can't remember oh you're on uh orlando i am on orlando yes that's that's the only limitation that's fine in case we heard that json we were going to be missing it it's fine you're on orlando um one of the things that we added in paris is a connection um area here in flow designer um you can still go to the platform tables for it uh to to set it up but we brought it uh and uh made it a a better user experience um in flow designer to manage those credential records um uh but but what you'll notice when you do go look to set up this spoke for github is it's already created you a connection and credential alias that you just go and put in the couple of details that are unique for you um and everything else is auto populated for you already so it took me about 10 minutes to set this up um didn't i do this like the day of creator con yeah and so this github spoke was one of those things and that setting up the credentials um for oauth for that was actually pretty fast i was surprised i was worried uh so uh cool so what we saw was uh jared had a script include uh and uh you can go ahead oh sure before i give us the summary um show us the uh the little utility you built for limiting the uh applications in the picker yeah absolutely absolutely this is now part of my standard kit um like most of us that have been on the products for a while uh we have our little things that we add into our dev instances um mine is always the export toolkits now also the chrome add-on uh sn utils well so what i'm surprised is you built this but haven't turned on the chrome utils search filtering for your update set picker do you know that that's a thing i go back to your config settings for the uh s utils there's a little check box enhanced application and updates that picker page load look yeah also notice a brand new feature on that uh the sb overlap on the instant icon that's the newest feature of snutils where you can give it colors and letters and if you have uh specifically servicenow instances that you don't control this helps you keep them straight up in your up in your tab all right that is a really nice feature a search box yeah very nice so that that is very handy for instances that you do not control and that you would like to keep a hundred percent of these available to you at any time but typically when i'm in in there i'm only using two or three or four scopes at any given time so what i've published out on share um is a feature one developer.servicenow.com exactly by default there is also a hundred applications on the left bar that i don't need in my daily operations so what um i've compiled into a thing i call libra toolkit is you're able to configure your left bar visibility and say what do i not want to see what do i want to be left with and then i can toggle that and it just redirects to a ui page run some code and leave your ex back and we see that the left bar refreshed and now i only have about 20 applications in my left bar similarly up on the top we can do a scope minimize i think which ones do i want to keep in my list it looks like we added a new uh github spoke which i'll leave that in there um so let's let's save that and then toggle that and this one runs the same ui refresh in the background but the one at the top is a little buggy so i'm going to refresh the whole tab and now we are limited to only the things that we care about uh absolutely that's pretty swanky uh because what i hate is accidentally clicking into the active directory app or any other app that you never use it will create a people update set for you to look at for all the all the time so yep so the current version published in share on the developer site includes the left bar minimize the next update just got this working last week includes the scope minimize and that is a scoped app with a global helper because obviously these are pretty powerful behind the scenes uh before creating the tools that are powering these tools and uh have that so that is really cool jared i'm gonna have to go install it now on like 50 instances [Laughter] yep uh anything else while i still have a browser window open uh no i'm good brad not for me that was too much fun uh thanks for sharing all that jared um i'm excited to to continue with that that looks like a lot of fun and being able to you know set up a scheduled job that backs up my update sets to github and it all be running in flow it's pretty nice because when i built that it was all purely just scripting and wasn't very consumable for anyone else to come by and look at or update or uh you know adjust it or consume it themselves so i pretty much kept those kinds of things to myself because it wasn't very shareable format so you've clearly added some polish to some of your things i really am going to install that the application limiter because the s and utils to do the search is pretty great but also i don't need like more than half of those one on my instances especially with all the components yeah yep i've got i i i'm thinking of uh adding that as enough feature to just always filter out those component ones because i never need to be in their scope that's true because because i you know work on those not even in the platform they just get uploaded so i've never used the app picker to pick those um so we took a script include that you had built a couple of years ago to uh you know do some updates that stuff and then we went into flow designer and we created an action um that consumed some of those scripts and we would create other actions that implemented some of those other functions and then we used a subflow to send that action some data and we installed and started to configure the github spoke um which i i love that you can now install those directly from inside your instance that's a huge feature as of orlando that just makes me so happy i don't have to go to the store to install um those spokes um that that's so nice and uh i almost got it fully going uh you know if we thought about it ahead of time we'd have got that spoke installed and gotten some credentials set up um and we would have actually been able to do that uh because we were we were right there taught ton of uh useful work right there if you're interested in doing ci cd stuff um take a look at the this is for anyone out there watching take a look at the orlando or paris ci cd apis or the spokes so there's some subflows and actions in flow designer that you can build your automation from for uh uh retrieving from source control switching branches um committing to the app repo so publishing installing from the app repo and like one or two other things so there are some powerful apis there to do source control and app repo automation and we could tie all that together in some flows with what jared just showed and get our full pipeline of updates at source control and app repo all working together um for a developer and that's a that's a nice holistic collection because i i don't know about you jared but i have to use all three of those things exactly it's yeah update sets especially for customers who are still enhancing itsm and all the other things that live in global uh yeah they're they're not they're not out of update sets um yet yeah and um i think we've answered most of the questions but the last question from phil um so moving to github was just one of the actions that uh jared's script include does one of the other ones is consume that from you know so being able to move it to another instance not just to github or to something like sending an email exactly yeah yeah inside that script include we have functions to load from a ball of text load from a attachment on the attachment table um and then preview and also commit so um that's that's going to be a cool episode um or whatever part of this if we and what i would do with that for me is i would turn those into uh scripted rest api endpoints and in fact i might turn your whole script included into a scripteddress api endpoint and then that's how i would build out the rest of the actions is just invoking those endpoints so it's in kind of the same architecture as the other ci cd things right that's why you know that's why i popped in my head i was like well that's how we did it for that one we could do it that same way for all of these is it's just calling the api on the instance and your api is back from a script include um and that's perfectly okay yeah yeah and that's too cool and the whole api could live in scope except for just these few commands that are are living in this uh in the script include we looked at right so uh let us rate our beverages and wrap up because we have gone way over time brad how was your special guinness my uh yeah guinness uh imperial stout aged in bourbon barrels was pretty good i give it a four two five it was uh it was a solid barrel aged four four two five how was your tasty german water german sparkling mineral bosser um i'm gonna it's it's water so i don't think it's water it's it's yeah plenty of calcium and minerals in there so yeah i'll call it a solid floor nice and my beer for tacos which i still have some of so i can have it with tacos um is is good gosu like it's nice it's a four it's it's solid i like what kind of tacos are you feeling right now oh well not turkey because i i ate all the turkey the turkey's gone so i did a practice smoke run uh so i've never smoked a turkey before and i i've wanted to do it for uh thanksgiving this year but you can't you can't do that uh uh as a you know first timer on thanksgiving so i tested it and uh apparently the test went well because there's no evidence left uh it's it's done and i cooked it on what like a monday didn't i no monday or tuesday it was it wasn't even the weekend and it's gone whole bird's gone every bit of it so uh the uh that turned out really well uh so again it'll probably be you know hamburger so beef beef tacos thanks uh out there in uh youtube land watching us live i appreciate y'all uh joining us and anyone watching this later uh thank you for joining us jared big thanks to you for sharing your contributions you are one of our most uh prolific share contributors uh and i appreciate you for that and with that i will say happy weekend everybody see you next time [Music] so [Music] you

View original source

https://www.youtube.com/watch?v=siIuIgQ4Cxk