SharePoint Designer 2010 Workflows with InfoPath 2010 forms and Visio Modeling

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
InfoPath forms are great ways to capture information from a user they can be presented to the user as a webform right within a SharePoint site now a user can fill out that form and it gets submitted to the form library within the SharePoint site the form library in turn has a capability to route that form for approval using a workflow SharePoint designer can be used to create that workflow now if you're not a developer or a site administrator or a designer if you're a business analyst for example you can also start using Visio and making your workflow workflows created in Visio can also be exported and imported later into SharePoint designer environment the workflow rules can then be configured directly into SharePoint designer and then SharePoint designer can publish it directly the workflow directly to the library all the stuff and more gonna be demonstrated here the form you're looking at right now is a training request form that an employee has to fill out in order to request training basically now this is an info path environment I'm going to go ahead and show you how this form is built currently the employee name text box right here if I go to the properties of that this is a required field that means cannot be blank the department field if I go there are properties of that and click on edit choices you'll see that there are a few manually design choices here i th are marketing and sales the four departments that exist in the company for Trinity requested once again edit choices shows the three different training choices that exist SharePoint ColdFusion and SP and for date and time if I click on the default value button for this date time I can see the default value right now is automatically taking in the current date and time and filling that up in this date time box all right so this is all filled up this is exactly the way I want it to be now what I want to do is test out this form matrix working properly and then publish it to sharepoint server into a form library so to test it out you can go to the Home tab and preview you can preview this form here we go everything is working fine let me close the preview and now I'm ready to go ahead and publish it to a SharePoint site first let's see exactly what site I want to publish it to here's a site that I have called sales and I wish to publish my InfoPath form for the training request right here so the first thing you need to do is take the URL take the address for that copy it to the clipboard back it in footpath go to the file tab go to publish and publish to SharePoint Server I'm gonna go ahead and do a control V here so to paste the address next I have a few choices as how I want to deploy this form I'm going to choose the form library choice meaning just go ahead and deploy it directly to a form library now I'm going to make a new form library I also then have the option to update an existing form library template let's make a new one the library name here is gonna be training requests and description for people so they know what to do with this is fill out form fill out this form to request training alright next this is a very important window here this says that if you want to promote columns if you want to promote fields I should say into columns you can add them here so the fields such as name field Department fields etc if you want to take those and you want to make them into columns in the form library that will you can go ahead and add them here click on add I'll choose date/time field add employee name and you can only do these one at a time so you have to go through this process one by one I took all four fields and I'm gonna go ahead and make them into columns next and publish okay so it's connecting to InfoPath forms services on my SharePoint Server published it out there and now I'm gonna click on open this form library check box click on close and automatically takes me to the new training request library they got created add the sales site for me as you can see that the department daytime employee named in 20 requested all four fields from InfoPath form have now become columns in this library I'm gonna go to click on add document here and when you click on that it opens up a new instance of my form template and I can go ahead and fill this out so all the stuff that I saw in the preview of the form exists here as well everything is working fine just the way it should be let me close it for now so the next step that I want to do is whenever somebody fills out a form in this library and goes out and submits the form here just save the form here it should kick off a workflow automatically so to make that workflow I can start with SharePoint designer or I can start with Visio now if I'm a business process analyst I might prefer Visio so let me do that I'm gonna go to Microsoft Office start up Microsoft Visio 2010 and within that you can click on the flow chart category look for the Microsoft SharePoint workflow created this functionality by the way only works in Microsoft Visio 2010 pre so you need to have Visio premium for this to work you have stencils different shapes basically for actions conditions and terminators let's start with putting my terminators start and terminate basically on the workflow design environment here now I'll go to actions lots of lots of different actions that exist in SharePoint designer all exist here as well I'll go ahead and select the Senate email action put that here now I'm gonna go to conditions I'll take the compare datasource condition put that over here of course this is gonna have a couple of different branches depending on the actual answer to the condition so I'll go back to actions here take a send an email action put that here also I need the set workflow status let me put that over here and lastly to stop a workflow action right here and for the bottom branch now I need to assign it to do item so that's right here take that action second action is going to be the set workflow status so this is my second branch let me zoom in here a little bit to show you how it looks now you need to connect these shapes together so I'm going to use the connector tool up above and connected one by one this of course can have two connections because it's a condition make sure you connect it from shape to shape not just from line to line it has to have that red box that comes up when you make the connection so Visio now understands this SharePoint workflow logic and what you can do to verify that everything is configured correctly is click on process and click on check diagram now currently when I I'm gonna get an air and the air is that for this shape to compare data source shape I need to define if the branch if the condition is gonna return true what should it do if it returns false what it should do so I need to right click on the first branch I'm gonna say yes right click on the second branch here and I'll say no for this I'll click on check diagram again everything is great let me close this pane here and from this process tab I also need to click on export to export the SharePoint workflow the workflow is gonna be named training request process and it's saved as a dot vwi file which is a Visio workflow interchange file this file is understood by a Visio and understood by SharePoint designer as a workflow click on save let me go now open up SharePoint designer and that's under the SharePoint category here Microsoft SharePoint designer 2010 so for this now I'm gonna go ahead and open up my sales site opened here it is intranet SPL comm slash sales once it opens up I'll go ahead and import the workflow so I'll go to workflows click on import from Visio and now I need to browse to my vwi file open it gun next to different choices that exist here attach it directly to a list or make it into a reusable workflow I'll go ahead and attach it to the training requests library the forum library that I just created using them for platform finish all right so this is what the workflow looks like wanting us imported now I need to configure it within SharePoint designer I need to configure the rules for it so first I want to click on that these users link here to define exactly who the email should get sent out to address book icon and I'm gonna say that go ahead and the user who created the current item send that person the email an email is simply you can have the subject line saying that received your request we have received your request request for reimburse the quest we're training for training of course and are processing it ok so that's a simple email second thing that I want to do is I want to click on this condition and configure this condition now this condition is going to take into account some employee credits that exist on the site each employee has certain employee credits training training credits that they can take within the year and if they've exceeded the employee credits then they are not not able to take any more training so let me show you that list first here it is employee credits within the same sales site three folks right here and all three of them have some credits so Asif romani which is me here I have 14 credits already taken Bryan Cutler has 10 and I in Hernandez has two now the rule here is that if you have more than 10 credits then you are done you cannot take any more training so let me configure that in my SharePoint designer workflow for the first value here is what I need to do is I'm going to click on it and configure it to show me the value the employee credits for a person who has fill out this form click on this FX button so this is a defined workflow lookup window I'm going to go ahead and look for the employee credits list and a field that I'm looking forward that's gonna be credits so from the employee credits list look for the credits field where the employee name is equal to the person who filled out this form so I'll click on the FX button here to do another look up and that lookup is gonna be for current item which is the current form InfoPath form that got filled out and look for the employee name in that form okay click on OK here it's telling me that it is possible that it might have turned more than one value for this is that ok and if it does return more than one value for this query is going to go ahead and use the first value return that is find yes so if employee credits is greater than and the value here I'm just going to type in 10 then it email is gonna get sent out and email of course is gonna be the user who created the current item just like before this one's gonna say your request has been rejected so let me use this string builder here by clicking on the ellipses and say request rejected and also put in the title of the form here and I could do that by clicking on the add or change lookup button look for the current item which is the form and I'll look for the title field so now it's going to take the title field of the form and put that in the subject right alongside with request rejected - here I'm going to say sorry you have exceeded your training credits alright now I'm going to set the workflow status of course to either cans or incomplete or something else it shows me that there are a few things here I can set transact it if I wanted to or I can go to make my own status so here I can say no good then stop the workflow with a certain message the message could be training credits have been exceeded okay so that's my first branch for my second branch now this is gonna say that okay so if everything is good and the employee credits have not been exceeded then go ahead and assign a to-do item to the person who is the manager of the person who filled out the form so the person will fill out the form look up their manager assign the task to that manager saying that if you could please go ahead and approve or disapprove the training request so I'm gonna click on a to-do item here and this task is going to be called training approval it's going to be made into a task called training approval then I'll click on these users this is a tricky part here where you have to do it now a workflow lookup for a user how do you find out click on ADD how do you find out the person who is the manager of the currently logged in user to fill out the form so the data source in this case is going to be the user profile database user profiles and the person I'm looking for or the field I'm looking for here is manager field and I want to assign it to the managers login name keep in mind here what I'm doing is assigning a task to the manager so I need to look up that login name assign it to the login name where the account name click on FX here I'm going to say look at the context of this workflow find out who was initiated who was the creator of this for this training request get that person's login name and this is the accountant that you need to look for find that person's manager that's what you're doing here click on ok and ok ok so the next thing now is set the workflow status you can once again choose any of these things then no good got added here as well I'm gonna go ahead and make another new one here that's gonna be all good ok my workflow is done I could keep it this way but I'm gonna enhance it a little bit further what I'll do is I'll go to the top here and add a new step just so I can create some separation InDesign in these actions that I have this is going to say email confirmation to user so I want this email to appear in this step to do that I'm gonna click on action click on this action here click on move up and here you go God moved up easily now this step here is gonna be called process request since that's what it's doing here first is the confirmation email and then the whole thing is processing a request now I do I want the email here and so the email gets sent out and the said workflow status to no good I want that to happen simultaneously currently the emails gonna get sent out and then after that the process is gonna go ahead and then set the workflow status to no good what I'm gonna do here is put a parallel block and within a parallel block I'm going to go ahead and move these actions within that so move up and move up notice that this now has changed too and instead of been so both of these will happen in parallel it will not wait to send out the email before it does this now I am ready now to go ahead and check the workflow and then go ahead and so let me check for errors no errors that's great I can save it or I can go ahead and directly publish it let me publish it so validates the workflow does everything that it needs to makes the required forms that it needs for the workflow and then and now it's published to my training request library I'll go to my training requests library click on add document and now I'll have actually first I'm going to go back here I need to go ahead and log in as a person who's gonna be filling out this document so I'll log in as Brian Brian is going to click on add document Brian Cutler he needs training on well he's out from HR and he needs training on SharePoint let's save this call it Brian that's gonna be the name of the file and I click on closing this form here's my form all the information that I put in well yelled over we should that's put that put in has become promoted two columns here now I need to go ahead and put this form through a workflow so I'll click on it click on workflows on the ribbon here's my workflow training request process let's start it up see what happens all right here it is train your request process this is in progress right now I'll click on it and here it is Irene Hernandez in the user profile database Irene Hernandez is Brian's manager so automatically looked it up it assigned the task to Irene Hernandez to go ahead and approve the training I'll go through the task list hiding should have gotten an email as well at this time she comes in let's see I'm gonna go ahead and have her sign in here so Irene comes and goes to the task and let's say completes the task it approves it all done so now I'm going to go back to training requests and here the training request process now says all good ok so everything is good the task has been completed let me go do one more thing here I'll go back to my workflow in SharePoint designer now I'm going to go to the workflow of settings page and I'll say that good and start this workflow automatically when a new item is created so I don't have to start the workflow manually that's the first thing and second I'm going to say sure workflow visualization on the Status page that shows visualization using Visio I'll republish the workflow and once that's done I'm going to go ahead and redo my scenario with a different person okay so I'll go back to training request library sign in as awesome so I'm logged in as myself now I do not have enough credits for training anymore I have exceeded my limit so let's see what happens when I fill out the form click on add document fill out my information okay I'm in marketing answers I already know SharePoint I'll go ahead and take a cold fusion class save massive and close okay so this is my form right here it's already in progress for the workflow I'll click on it see what's going on here's my Visio visualization okay it's saying that email has been sent what Lisa tried to be sent already it compared the datasource it compared the credits and it found out that I didn't have enough credits so I stopped the workflow that's what this is saying here so no task has been generated to bind him to anybody and the workflow history here says that trading credits have been exceeded everything was works like it's supposed to this visualization also can be taken into Visio you can click on the open in Visio and it's gonna show you the visualization in Visio which you can then print it out and show it to whoever you want to show it to in just like this scenario many many more scenarios can be created using these products so you saw how InfoPath Visio and SharePoint designer can be used together to create powerful no code end-to-end solutions in SharePoint 2010
Info
Channel: VisualSP
Views: 83,005
Rating: 4.9439254 out of 5
Keywords: visio, infopath, sharepoint designer, workflows, forms, sharepoint 2010, #mstips
Id: Zw7HLXGCtNA
Channel Id: undefined
Length: 25min 46sec (1546 seconds)
Published: Fri Feb 17 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.