logo

NJP

Hackathon Kickoff - Live Coding Happy Hour for May 1, 2020

Import · May 02, 2020 · video

[Music] hello and welcome to live code happy hour this special edition of lab could hack yet happy hour that's kicking off the creator con hackathon it is May the 1st 2020 I'm here with some familiar faces my coworkers bread and Chuck let's get our introductions down Chuck first hey I'm Chuck Tomasi senior developer evangelist at ServiceNow in the platform team and it's May 1st creator Kahn is like just days away the hackathon is what hour away or something it's one hour Zane it's finally upon us I'm very excited awesome and Brad everybody my name is Brad Tilton and I'm a developer advocate with a developer program at ServiceNow I've been doing ServiceNow stuff and lots of different roles for a while and I'm excited for today's show and excited that the hackathon is starting in 49 minutes counting at all hello I'm Andrew Barnes developer advocate also with Brad we're both in the platform a business unit here at ServiceNow and our role is to be your voice to platform product management and be their voice to you so you know let us know what you want enhanced for the platform core platform tooling and we'll help make that happen for you I've been doing a software engineering running enterprise applications for a long time been on the platform for five years and just super excited to kick off our hackathon with this show today and we'll talk some more about other things later let's introduce our other guests our beverages of choice for the day same order same order I'm taking the light road I am drinking water alright I love some h2o I am drinking a car baclava Street I was also taking the light road and that it's not a stout it's not a stout that's true and I am having a sweet water 420 ooh classic of the south so that's a little light for me I mean it's to pee out so that's light right I like them you could go to whenever I'm in Atlanta so as I said we are kicking off the hackathon at the conclusion of our show today we're gonna play a little kick-off video that's will be informative for our hackathon participants so stay tuned for that or watch it later you know as you're working through the hackathon this weekend it'll be in the channel as a separate video entry that you can watch and like we said next week knowledge starts but this is the first of it so we're we're kicking it off right here this is this is the start of knowledge I know that we have been working furiously especially we were always worked furiously at this time of year for knowledge but the transition to the the new format and things have definitely not amaz'd less gray hairs for me that's for sure so but the hackathon we had we had planned since Brad and I since we claimed the hackathon for this year we we planned it to be virtual so fortunately that component of it didn't change a lot for us and so over the weekend we're gonna have teams competing for prizes and glory and we are really excited to see what you developers out there build and those of you that are watching that aren't directly participating in the hackathon come join in our our live streams later this weekend we're gonna be dropping in on some teams and asking the gurus how things are going and there will be some other teams that are live-streaming during the event and you can tune in there will be reposting those an hour which stream YouTube doesn't have a nice feature for that but we will be doing that in our twitch channel which is the same channel name as the YouTube one if your most of our most of our folks watch us on YouTube but for the for those the Rijo stting twitch is the best place for that today we actually don't know what we're working on supposedly I'm gonna go ahh I got a tweet so one of our co-workers was a developer MVP for this year and he wasn't a co-worker when he was chosen for that but now he does work in service now Mark Scott and I put it out to our MVPs and said hey we don't have anything particular that we want to solve today give us a problem utility that you want us to build that his time box that we could actually accomplish it on the show and don't tell us what it is and he couldn't join us but he's scheduled a tweet and it says for live code happy hour today I'd like to see you guys build a flow that adds all Windows servers to the affected sea eyes of the change requests for patching ok this would need to trigger on some identifiers in the change form category question mark and would save time on patch days hmm all right I think that's accomplishable Wow Chuck's not sure I just wanna make sure I get the idea right so we're triggering a flow based on some change on a change record it's going to identify the windows servers and attach them to the affected ci is a related list on the change table it will it will put them in the affected sea eyes list yes ok and why are we picking on just the windows server because we're doing Windows patching ok assuming we're going to need a separate flow for doing say AIX servers or Linux servers or I am a genericized on the type of chain so we can either trigger off of something that a change template is providing on the change record to say what class of records is affecting and then import that maybe a sub flow maybe a sub flow that takes the inputs in our first use case doesn't have an automatic one we just set them but the sub flow could be genericized once we we could take a class as an input we adjust that yeah yeah and then we could have a linux flow called the same sub flow I like that Brad Wow listen mr. architect going already so and Chuck said that you were going to to give the drive in today is there anything else that we want to share before we hop into the incident I'm drinking the water because I'm the designated driver he is to designate a driver we that was a good idea earlier in the week when you said the the person with hands on keyboard in doing the developing during the show that's the that's the designated driver it had a live coding you just can't think driver driver driver at oh it's it's hilarious I love it we should have I have an idea once in a while okay we've got a lot of chat so thank you guys for being here and we'll get into the instance and start working on that so let's start by open up a change form and in you know going through a you know the process manually is usually the way that I get started is have a change record and go add a Windows server to the affected related list and you know go through that process to see if there's any if there's any automation in the instance that's preventing that that I want to know that it is accomplishable before I try and and add another layer of complexity like automating it in a flow and then it's not working and I'm not sure why it could have been our flow logic or you know a business rule stopping me all right I don't know if you're seeing my screen or not yeah we we are not rats this is the fur time I've used a zoom since upgrading to Catalina so it wanted permission in the system preferences maybe I'm not the best idea for a designated driver today let's give it a better are we are we sharing yet no sir no okay ah well this is a better sign because now it's at least giving the icons of the desktop last time it happy that is looking better sir okay right rabbit out of hat factor on this crazy thing right now that's looking good right now hmm yeah let's that's 150 so we'll see how it goes with that I may have to back it down from flow we'll see okay start with change record let's take a look at what we're actually dealing with change open I should have some basic demo data out of the box here which means I probably probably got some Windows servers as well not a whole lot of them but let's see I will take one that it's in a new state like that top one like that top one right there I changed up my cursor pointer thing Catalina didn't like my old one you actually got upgraded to Catalina I know on my home machine this is a it headed to it's writing the new person of podcasting for dummies and iTunes kind of goes by anyway so we may be dealing with some artifacts of a different project okay we've got our number we've got our main config item and we are going to look at the affected or impacted services affected see eyes affected CI yeah and manually we could do this and good let's just go through and practice what we're going to do to see if it actually does what we wanted to do this is where we take a drink I guess yeah okay got it hmm they're scaring me let's do filter I see you've added the the Chrome extension for the tag of which instance you're in yes environment marker that's a handy one that's that's pretty nice I thought I'd point that out to the audience well you can't see it very well but that the the black triangle at the corner of your screen actually says pedia yeah there you go yeah yeah it's pretty neat I got that idea from a developer meetup so they're worth something class is look at all these classes we've got I'm just gonna go down to W for Windows web web logic windows oh we've got lots of different things windows server I that was our requirement right let's do windows server yeah I believe that's what the requirement said and our seaters eight of them so let's say that's our requirement this is actually a similar request to what I did as a customer to schedule regular patch reboot maintenance tasks and granted it was a different world back in 2008 but I had done templates and scheduled and made a table that told me what scheduled originally had the assigned to in the template but that was a pain to manage because suddenly Brian's not in charge of the Solaris server somebody there's no list editing on the template fields so it was just I made another table to abstract that and get these routine tests so this is an interesting way that we're approaching this one okay so we've got yeah this is the typical use case for the the configuration teams as they would come and narrow this down to the right class and then the right filtering and they they'd hit at all and um okay so that's kind of what we want and this is what we want and and we can see that you can actually do that on our target records that we want so so now we now that we've done our process manually now we go looking at automating it designer loading loading loading I didn't actually just get to see what folks said about the animation it's been a while but wasn't this a list collector with an edit button on the related list at one time I think it was yeah that whole new modal thing going on wondering why okay I wanna make sure that wasn't my imagination let's do that somebody can tell us when it was between fuji and geneva somewhere between fall twenty thousand eight okay now Brad you would suggested possibly do this in a sub flow shall we start there with the roots of where we're going I think yeah I think a sub flow makes sense because we can we can define some inputs for our sub flow and we can do some genera sizing set affected see eyes anybody have a better name than that let's not put that in our sandbox scope let's put it in global just because change is in global and I feel like a global day do we want it in a category of any type probably would make sense to have like maybe there's other changes going on here I don't have a whole lot of categories so let's create one around change change may yeah change management it seems like a good big category I like that you'll see where the category comes up when we pull it up on the sub flow menu but it basically gives you blocks of sub categories available to all application scopes that sounds about right and you want to use permissions or no I want to use permissions because I want to simulate the actual user doing the work then let's continue with our sub flow we know we need at least one input and that would be the class right so let's create an input class CI class what do you want to call it CI class seems seems a little more descriptive than just saying or or even affected CI class there you go do we need the change as well yes because it probably want to attach these to the record yeah if we want to do the action inside the sub flow then yeah we'd want to change cuz the records we need to create will need to know that reference yeah record is going to be a reference to change change request I have I have spent so so so long of my service now life in the the change request table your implementations in two thousand eleven twelve and thirteen for large pharma and we'll just say fortune like fortune five company and it was a learning experience it really was but I was pleased with the end results but it's been a long time since I played with change but I see it as no different than some of the other things that we've been doing here with flow yeah okay let's do we want to do a lookup of cis on that class right so let's yes we want to look up the records yep that seems like a good first step look up records plural you need a space between Luka look and up is two words it depends on okay so there's both there's both of them and they're both valid but in different use cases okay I'm actually the one who filed the defect for that we could we could look up records on the windows server table but that would defeat the purpose of us using a CI we want to look up any CI for this be generic we want to genera size it so configure can we do our old trick of just doing CMD BCI black bracket oh yes good I like that shortcut method yeah and and I like to do even like I even type it in not the table window and do left bracket the name right bracket and paste it in there and in it and it makes it not search and render the whole list at all it just goes straight to your record it it doesn't work everywhere though I found that hole brackety thing doesn't work in every table picker suit well where it works it's it's magical because that that drop-down it's a slow drop down so class is data pill picker inputs affected CI class string that's right it's a string field right class is a string I think [Music] table field yeah it's a it's a special type class is a specialty i dot list and if we do configure class type or something is no like that feel this I can't even see that it's behind one of my cameras there global so I'm configure table table I know it could have done dictionary but I kind of like looking at table formats first and we want to find mr. or mrs. class is a system class name is that going to impact our search ability guess we'll find out because this input didn't really give us the option of system class name did it you're about to change in input someone's gonna get peeved I would not put money on that begin the list yeah for those of you that are joining us late I saw some questions about what we're working on so the requirement they came to us it was a blind requirement today by our co-worker Mark Scott told us that he would like to automate populating the affected see as of a change request for patching and in this case we're going to do Windows server but we're trying to genera size it to any class which is why we're using a sub flow which will accept the class and the change request to fill this out okay now we got that matching up I think that'll be happy maximum results a thousand you think anybody's gonna be patching more than a thousand servers absolutely what do you want for a limit ten thousand ten thousand easy hundred thousand fifty thousand but but it's configurable so it's configurable yeah just in case we have a runaway script I don't want to be here all day yeah okay so we've got our lookup then we probably need a for each yes yeah and one of those fortune fives they had you know and that was that was one of the subsidiaries that we were doing this for so I want for each configuration item records that's about the easiest thing we'll do all day now we're going to create records that create or update yeah I was gonna say what if it already exists yeah let's do a creator update we don't get to do those too often do we I don't think we've used that on the stream yet no in other parlance that's known as an absurd term before it's such a fun term absurd you know what sounds like you're sick update or insert whichever one whichever one works better so we want see eyes affected which is also has affected see is depending on which it is fun many to many newly asked underscore see I my friend yes one of the more common tables you'll use if you are dealing with change incident problem and see is it's like task under SLA so fields drop in a template oh when did that become a thing I hadn't seen that before is there a pill picker do we have it we don't have a template there's no picker where would you get a template to drop in there or would you have had to look one up somewhere you think yeah I have no idea what that is I don't either that's news to me for now we'll hard-code it what do you want are you running an early version of something no this is Orlando well my PDI is p1 I think this is that's 7900 HR PDI yeah hotfix one yeah I don't think I've seen the drop in a template I don't think I've used this I don't think I've used this action type though either so that's I don't know what that is we are Kevin says that template feature is in New York and I don't know how to use it so we're gonna have to figure out how to use that at some point yes I know I don't I want to know what it does yeah I'm thinking we would have a maybe ooh maybe we can even modify this later to accept the template that we want to put in here to make it even more flexible that might start getting into that rule of keep your things simple I keep your actions simple keep your flow simple how many parameters is too many parameters yeah so here those are very simple records we could go look at one of the ones that we generated to make sure we we put in the right things but I believe it's just simply a reference to the change request end to the CI so that is the point of this many-to-many table so we have a CI which will point at whatever CI we pulled out of our for each loop gosh this feel is almost too simple and then we have a task which will point at our parent change record that that's some of the joys of flow designer though is when when flow designer is meant to do the thing you're trying to do it feels so good is that easy I know I'm almost disappointed don't be disappointed we got some more things we could do to it but okay so let's get working and then then then maybe feel change open I still had them on forty thousand seven now in scooter here for forty thousand four cuz that sounds like a file not found here doesn't it okay and does it have any affected see eyes on it no no forty thousand for is please reboot the as/400 which has a lot to do with our Windows servers doesn't let's do a test on the sub flow the class is going to be what are we put in here CMD BCI window just go grab one of those records and make sure we get it right okay so servers oops windows configuration servers windows it is in CMD bc i under win under server I'm looking at the URL CMDB CI under win under server change record is forty thousand four which isn't on here interestingly not oh these are new make with it CH G 0 0 0 4 triple 0 4 sorted right run ik and so our expectation was that we got all of those records from that which was eight I think look 8 8 right there there's a big old snowman ok and here's some 8 and it even has the display values of them now for the $2 prize we've refreshed than our grand prize clicking the breadcrumb refresh is just that related list eight eight I feel like the countdown all right everybody take a drink there we go water you want to modify whatever beverage of choice you have let's drink it we're done in 25 minutes we're not sad oh no we still want to make the flow yeah we still need to to actually automate the use case so we made generic then and so now we in particular use case yeah we want an output here should we tell something that tells the flow that it works yeah we did something would be to let let us set us output of like how many were added ah yes I have a count from as we get a count from the lookups and throw in the status from the well no I don't want to status from each of the loops just the count one and we set that where do you set the outputs you know never say it's right there under flow logic at the follow logic he is assigned sub flow outfit output I love that equals y icon okay so we pick them equals y that's only half an equation he implies Q solve for x ones one dot count yeah you know calculus joke we used to say save count ah publish now if you make a flow absolutely okay so now we're gonna make a flow on the change record and I think the way that I would like to genera size it is so well we need to make our trigger first which is probably going to be a category of you know something like patching so we might need to go make that category but it but in your process that would exist so we could do we have anything worthy of triggering at this point mmm-hmm state-authorized state a jeweled implement yes so we're gonna want between new and assess is probably when we have to populate that I can't go new SSI go new to authorize that's interesting I depend on your change type sure so emergency is gonna have less steps cuz okay so what when it changes from new that seems pretty generic yeah that changes from new that seems fine yeah changes found new okay that'll be our trigger category let's do category Apache so if we don't have a patching one let's are you doing out of a patching one let's go ahead and add that we can do that let's see what the choices look like today on The Price is Right pink touchable sweet well that's not alphabetic so I'm not being particular we'll just leave other on the bottom that's like it in other belongs on the bottom other and ahold are probably my two least favorite because they get selected way more times than they should if you ever consider a hold you better darn well have an unhold process built somewhere you should or nag people to do so right so now we're gonna create the flow new flow change set affected see eyes because I tempted earlier remembered okay who initiated session Global section one looks good description goes here yeah copy yeah we know what it is but when you write it you know out there building it in the world you'd say something like populates the affected CI related lists for blah blah blah and employees the blah blah blah flow absolutely so we want the change request cable when category um I'm wondering if it picked it up oh it did pick it up good cuz I didn't start the flow yet and state changes from I don't use changes from very often but this is fun it's a it's a rare case when you've got a brand that happens from the initial like that's the perfect time to use that yeah and change is one of those times where you jump from new to so multipath states so okay it's a good use case run it once run it if it's not running what do we think I think this was should be full so you type Amira sized it so if I genericized the sub flow I would I would care that I'd need to clean it up first and then we would have only done inserts so in this case I don't know that I want to run it every time and I don't think it we're not going to move from new to anything else more than you can in in the typical change processes you can't get back to new right so once feels about right for this one once feels right it's a discussion we should have yeah it should fit into whatever your change process is do we want this to run foreground or background feels okay backgrounds fine because I don't want to wait for that in a big instead when I hit you know move to the next level I want to I want it - give me my session back we still haven't put display values up here has changes from my versalife wonky is that deserves me reaching over for the soundboard come on that's my sound board that was worthy of that I agree Pinkston man come on so now we're going to in our actions invoke our sub flow sub flow and here's where normal look we already had a category so it's nice that I yes sir new category jumps right out fortunate accident pick are the the thing I would like to populate the affected CI class where I'd like to get that actually is from D is from the CI on the change request so get watching okay if you have to pick one like the rest okay and it'll pick the rest of them change configuration item I use that typing filter thing go letting me pick it it's the right was your field type well is string right and it's volunteering we changed it to system class type class pass what is configuration items class that type it seems yes it has to be because that's what we're looking outrage item hold on let's just look at the dictionary item for this so let's go the dictionary item no that wasn't where I wanted to go yeah you want to go to the base yeah I want to like go into this open the record and pick the class here hmm this is I think we just had a challenge I think we hit a peculiarities alright this should have a class I mean cuz this is where we got it from this is where we got it from I needed a system class name and our parameter is looking for a system class name now was that not in the picker was that that a thing that we could pick eat that thing was that the problem on if you go trigger change record configuration item it's only looking for strings look at this the only thing that's lit up as a string this is weird is not available it thinks it's a choice well that is little disappointing okay but hey guess what we're developers hit the FX button hit it like you mean it [Laughter] okay so we want FD this is gonna be fun oh we need to return something so create a variable to return do we need to create the variable or do we just run we just return since we're not doing any transforms into it god why just a current in the example we want trigger dot what yeah current current is what was running okay that wasn't obvious cuz I'm looking at the data panel going yeah and then configuration is the MD BCI yep dot and dot class last name yeah yeah okay that's it that's it collect you guys agree nothing I wasn't feeling comfortable with that but and very sneakily their collapse it don't click the FX again don't click the FX button so hit the collapse is fine but hitting the FX turns it off but you don't lose your script you just doesn't lose it it just won't run but okay just for example it goes now you wait yeah you have to and this now that it's lit up it says I'm going to use that we can change is going to be this one none say and so in this case if that truly is how I'm kind of generically use this we could have just passed in the change request and not needed to pass in the class aim because we could have gotten that inside the sub flow is is it is a design decision you're right we gave it a parameter that I already knew yeah but that's okay I'm not sad I often do that with like script includes just passed the whole glad record you'll have more than you ever wanted well and in when you pass the record over you know unless you know the exact class yeah which we did in this case it's it's actually easier to break the two things out while you have the the correct data pills than it is to do a lookup again in your sub flow for a record you have passed into it the other thing to remember is when you pass in a script if you pass a glide record it's my reference it's not by copy so you are if any changes you make on that will be affected on the actual glide record that you passed in so if you know your parameters are passing by reference or passing by value he's passing by reference so be careful that's all I'm gonna say okay right so let's change our category and change the yeah change our communications to a Windows server what we already have affected see as on this all we do we do so we either need to remove them or like remove part of them remove just some sorry but it's gonna look for the a s for a hundred class and maybe add somebody yes but but remove some of these and then add you know add one of them up top leak s si PS do one I'm gonna guess that's a fictional San Diego s AP server yes a PE look it says Windows cluster windows server suite now we'll change the category change the category to patching and authorize and ooh look at that it became read-only - that was an interesting effect lots of that in the change request world so now our expectation affected see eyes cannot be created for in progress change requests was that just informative or did it do it let's go check the flow and or well we can refresh here but yeah we didn't activate the flow all we didn't we didn't we want to test we test let's do tested against that Rexxar it's fine which one was that was 40,000 for change she was her for triple zero four or zero for you someone's got a 404 going on in his head running it's running an uncomfortably long time that was a comfortably long time invoking a sub flow actually takes takes a moment okay all right let's expand those steps from the drop down on the left of the sub flow hit our arrow and the drop down of the sub weight drop down above oh yeah to get there the sub steps there and let's see where we're was recorded by a business rule oh you can't do this cuz the read only affected CI win is only new you okay so we need a different trigger we've picked a bad use case we had picked we have picked a poor trigger so this is one of those times when the doing this doing the process manually would have caught this right like yes it would have so instead of changing from new wills going to be state is new and this might be one of those times where you know we make this flow a UI action let's do like we get we invoke the flow from a UI action let's do that just for fun to get the flow API out okay so we don't need data's new categories patching yeah we don't need this because we're the UI action will take care of that it's true that can be redundant and we don't want this to be triggering any old time it's what can we use to prevent this trigger from triggering if we only want it to protect trigger from script we only want it to go from script so run once like once yeah run once and then set it in the past but then we don't have a then we don't have an input we don't need an in oh that's it in the flow API yeah we would just call the sub flow directly then yeah let's do that let's disable this yeah we'll just call it from the subfloor API we never activated it yeah never activated it doesn't exist run once last few days ago okay so we want our happy little code snippet yep which is very handy like grabbing these is super duper handy so we come we have to decide whether or not we want to run this from the server side or the client side which we have access to both of those in the UI action I am a server-side guy so if if our decision was to run it in the background we want it server-side right right so server sides fine then right thank you synchronously run in the foreground we but we'll use this line because it's async right okay so let's we copied the code snippet there are times when you want to use client but my general philosophy is use client side sparingly for just about everything Hauser's you know so let's go to our change record and create figure UI action Wow completely missed that one my font size is making all kinds of fun here UI actions there it is yeah what when you're when you move from 4k down to like ten eighty and then zoomed in a bunch like it feels like I'm on a whole different machine like my mouse and how fast I move it relative to the things on the screen is way out of proportion name create affected see eyes how's that on the change table yeah this feels like a form linked to me what do you think yes it doesn't get to be a really important yeah you only have to click it once I mean it is fairly contextual because we're gonna want to narrow down to just patching but yeah they're like it's social search I like to also give my action names names it's just one of those things it can there's rare situations where something super usable went useful when you have expansions later yes you know create affected see is we don't need anything else that I can see some comments would be nice and our condition is current that state there's minus 5 right oh yeah what's minus 5 that's the handy part of it not doing we display value did it make it upper case or lower case for me I don't know I'm gonna guess it was unsmoked patching with a capital P we're gonna validate that in a second okay you know what we probably could can we pop this out into a new window yes you can Oh little clicking as a thing history for the wind show choice list yeah yeah here's the whole world of cast yeah in this case I would have just gone to the XML cuz I had the bat you know what down that record grand idea cuz the choice list for a category and the task based tables is really long almost as much fun as state okay and I don't use this nearly as much as I should show XML then in category we can see what's actually stored in the database matching with a capital patching with capital P sometimes when it makes new entries for you it's helpful and makes them lowercase and underscores the things and sometimes not so I was right gotcha matching with a capital P we want to paste in our code cut out we don't uncommon the stuff we do don't want synchronous we want acing right and then we need to set some inputs we need some inputs that look like well it already knows our in depth but this is that's a handy part about that snippet is it knows the inputs for your sub flow which is great current CMDB CI dot sis class name yeah I think we can trust that it we don't have to string on there and that looks good yeah we're not looping over it or anything so current this is this is awesome that it goes hey it's glide record of this table Wow nice comments and we probably want a action dot set redirect URL all right stay here that'd be my first choice we good yeah let's do it and when I was called self-inflicting functions if he's immediately invoked self-inflicting that's that's the best name for that [Laughter] self-inflicting okay we need to go back to new but we can't go back to new on this one he's already burned that cam yeah that ship has sailed lighting a match man you gonna light a match once testing change request process oh you can burn through demo data fast and what I would have given for 80th back when I was doing that for the first time oh that okay and do we have any down here oh we do well we already played with this one so let's play with this one again take a few things off this was the only manually did before so delete those they just happen to click the same one before and now and well let's check do we have our UI action we shouldn't because we don't have the right category yet so category is pitching and now do we have the category of the UI action yes create effective C eyes but we want our SD No s ap s do one Thank You mr. e save that now we can hit this and we currently have five five is the magic number we already have s do one in here let's make it a little more fun and take s do one out alright delete delete delete okay one more we get a drink well it didn't crash and go back to the list that was nice that that is handy when your your action doesn't get blue where's the rest where are the rest what happened die let's go take a look at our execution hey there our old one I did it not run I don't think it ran this one hasn't been run since 1324 it's now 1350 for me is it running asynchronously and just running release no house you want to check the generic locks or you want to check the look at the UI action I don't know what do you want to do let's go Z a create affected CI says make sure we didn't forget to uncomment something like run input mask this past the input set affected see eyes is the name of the script because it gave us that outputs is output we didn't do anything with the outputs well we won't have code snippet will not have access to the outputs so we should comment out that line died let's go check the system logs when in doubt log it out system logs and system log says script undefined no thrown error who's that from looks like about the time I ran this thing let's try it again can I get property of undefined zero who's that that's not me that's somebody else that's somebody else I'm not Wow live message utils we weren't playing there today let's keep going so we go back to our 40,000 whatever it was order change request that one these reboot PeopleSoft patching that is a Windows Server right preview this right yeah Lenovo think server TV 2:30 it says Windows Server right at the top so we go and see I is there let's let's take this one up I didn't validate that was taken off the list you want to delete that yes I do we should have four we still have five it's not removing anything for me Wow okay we removed before something in the logs that you want to explain I'm sorry what just happened I was answering I was trying to delete s ApS do one and it didn't delete oh that there's probably so that's the one you're choosing right so it's automatically putting it there's there's automatic rules for populating itself down there you can't you can't kill you can't saw off the branch you're sitting on yeah you can't say the thing that I'm changing is unaffected by this change why not it's only there's a pointer okay so let's do create affected si eyes there's something fishy I almost want a GS add info message in my UI action to say hey I'm here and I'm running but the fact that it's doing the action does set redirect is working hmm let's make sure we're invoking these you're yeah the script part right can you put some logs but a breakpoint yeah yeah we could it's synchronous so that part of it could to have a breakpoint not carpark could have a breakpoint let's just see if we're starting okay where's my debugger I don't know if I put my debugger in a shortcut favorite yet debugger rip debugger there it is hello I'm script debugger how may I help you yeah and so if you're asking about questions about the plug-ins for your instances if there are plugins that you can enable directly go ahead and enable them if there are plugins that you need go ahead and either we're gonna have a zoom session right after this with the gurus which you can you know send them a message or post it to the community and we'll get in and let us know which instance and what the plug-in name is and we'll get it installed for you as soon as we can Andrews doing hackathons have already and add you add your team name to the post as well which affected CI class is write change record is our glide record suite and and then it's gonna throw in a van so we won't write we won't see what happens there so it should just go straight to the redirect so unless we're getting an error in the system log out here we don't see if our execution yeah we should be getting an execution here it did Whedon the subfloor is activated I remember us doing that yeah the subfloor hasn't been run since a half-hour ago we're almost out of time and we're so treat hard like we're gonna have to wrap up painful we go just some flow if you would and just load it up and see if it's got anything weird going on like it's yeah class there's our two inputs looks fine we can't save or publish it's published it's good to go like I should be running I'm the system administrator I should be able to run this I don't see any reason why this would regions able to road show spoke show triggered flows no ah did we find a bug and tested against that record okay which that was forty thousand seven chg double zero for triple zero error your Turing in C insert of task CI mmm is it our absurd I think it's airing on the upside but it worked so well on forty thousand four it did alright well we I think I think we have accomplished the task which was running this server-side and invoking it from a flow we got that we nailed that we we were we had a stretch goal of adding a UI action to invoke this up flow directly and and we didn't quite a cheap that but let's let's drop out of the share yeah so that was fun absolutely flow did a great job for us it really did so that was a lot of interesting things that we got into there we we touched on being able to you know you utilize a sub flow the inputs of the sub flow the outputs of a sub flow we used a record lookup we tried to use and successfully in some cases use the up sir so the the insert or update or went out what is it the create or update date that's it and then then we went the path of invoking the sub flow asynchronously through the the UI action and that's where we had a little bit of a struggle but but should be should be pretty easy to figure out why it doesn't like us there in update the the comments here of what we did wrong to fix that up but the that code snippet is really handy when you're in your flows or sub flows or actions and you want to invoke any of those from either the server side or the client side you can you know click that little kebab and say you know get code snippet and then work from there that's pretty good so excellent work Chuck thank you Mark Scott for your idea let's rate our drinks and then the hackathon starts in like 60 seconds yeah go water 5.0 everyday 5.0 it's so good I love water Brad my my love street we're gonna give it a 375 and the sweet water 420 which doesn't look green because well you know it's getting picking up the background because it's it is exactly the same shade of green as my green screen which is hilarious it is is the same shade even not just green it's it's a 375 I'm hanging with you there Brad so thank you audience you guys were great today for joining us especially the new folks who have never been here we're glad to have you we didn't if you can't tell we don't plan any of this stuff this is not a polished demo it's not supposed to be a polished demo so this is three ServiceNow experts doing something that they didn't know they were gonna do before the show started so we would it's definitely unscripted and it shows how we get through those steps the hackathon is starting now we're gonna have a guru session right now so if you're here for the hackathon we're gonna on the channel we're gonna make public the the video right now to get you started with the hackathon I am gonna end the stream but you can watch the channel directly for that video that I'll publish right now it's already there I just need to turn it on for you and we'll get hacking and come back and join us on Saturday and Sunday we're gonna have live streams then we're gonna check in on the team's anything else you want to share Brad the hackathon king yeah so you can go ahead and start getting getting going hacking we're gonna do a live zoom guru session starting as soon as we hang this up if you need help you can check on the community if you have any trouble logging into your instances we can help you with that I would start if you're just having login issues or plugin issues I don't know that I would log into the zoom call just post on the community the name of your team the name of your instance and what's going on and we'll take a look at it and yeah we have an informational video coming up in just a minute and we do this show every Friday except for next week I think but just about every Friday at 4:30 Eastern so if you enjoyed this and learn something tune in and we'll continue to struggle through all sorts of random development topics all right in the video is public now so you're welcome to start watching that right now thank you everyone and have a great buddy great weekend whether or not you're you know just watching the hackathon are joining in I hope you do engage and we'll see you next time

View original source

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