This action might not be possible to undo. Are you sure you want to continue?
Go to your site collection Solutions Gallery (in Site settings):
Upload the file Incidents.wsp from your Starter folder into your site collection Solution Gallery
Activate the Solution:
Once the solution is activated, a new site template ( Incidents) will be available; create a new site based on this template. Go to the Managers lists and associate the following managers to these type of incidents:
Star Sharepoint Designer 2010 and open this site. Click on the Navigation panel and select workflows:
In the workflow ribbon, select Reusable workflows.In the new dialog, name your workflow IncidentWF:
In the workflow surface, add 3 steps (click on the Step button and rename the existing step)
In the Find Manager step we will try to find the manager in charge of the incident type by doing a lookup into the Managers list; we will first create a variable to store the Manager account: click on the button Local variables in the ribbon add a local variable and name it Manager :
In the Find Manager step, add a new Action (click Action in the ribbon); select the action Set Workflow Variable in the Core actions category:
Click on the link value.Click on the link Workflow Variable and select the variable Manager. then click on the fx button to do the lookup : Select the Manager field of the Managers list. and filter on the IncidentType column : Click on the Fx button next and filter on the IncidentType column of the current item : .
Move to the second step.Don’t take the warning message into account when you click ok. rename the task process as Litware training Incident: . type start followed by enter and select Set Approval Process: Your workflow should look like this : Click on Approval just after start and in the next dialog.
click on Change the behavior of the overall task process: Find the Step When the Task Process Completes . In the Customization panel of your Task process. name it ApprovalStatus.Create a new local variable.
. Go back to the workflow editor : you can navigate to the different workflow elements by using the navigation breadcrumb : In the Last step (Dispatch to correct queue…). test if the incident is approved and create a new list item in the appropriate list (Food Incidents.Store the workflow status in your ApprovalStatus variable: Don’t forget to save your workflow (Save button in the ribbon) on a regular basis. Trainer Incidents or Manual Incident).
click on this user and select a workflow lookup to grab the Manager variable . Use the Find manager activity. we will send an e-mail to the Manager of the current manager with a reference to the new incident (in the new list).Your step should look like this: If the incident has been approved. On the Find Manager activity.
Click on Add and find the Manager variable: The output of the Find Manager action should be stored into a new variable (create it) named BigBoss : Add a send Mail activity and send the mail to the big boss. add a workflow lookups in the message body and in the To: field .
. select your workflow template ( IncidentWF). be patient… Go to the Incident CT content type definition (the Incidents list if based on this content type) and click on Workflow settings: Click on Add a workflow and in the new window.Save and publish your workflow : you will find the Publish button in the ribbon.) . publishing can takes a few seconds. type the name Litware Incident for your workflow association (unique name.
. add a new Incident of type food : Start the workflow by selecting the Workflow button in the Ribbon.Go to the Incidents list. select Litware Incident and start it.
but it doesn’t at least in a remote desktop (bug ?). click on Send receive All Folder in the Send Receive Ribbon. Use Remote desktop and log in with Brianc account (password is pass@word1). the Food Manager (in this case Brianc) will have to approve the incident. When you click on the task. the custom task form will show up : . start Outlook 2010.You have to use the browser to display the task from the task list. the task form should show up. you should get an e-mail in your inbox: Normally when you click on the Open this task link in the e-mail message.If your incident type was food.
an e-mail has been sent to Brianc’s boss: Keithd. If you go to the Incidents-Food list. Create a new Remote Desktop session with KeithD account and check his e-mail.Click on Approve. you will see your new incident. In the meantime. start the workflow and check the workflow status page: you will see the workflow rendered by Visio Services : . Get back to your workflow Summary page in Sharepoint Designer and check the option Show Workflow visualization on status Page. Publish your workflow .
CREATING WORKF LOWS WITH VISIO 2010 1. as well as 2 Log To History List shapes: .LAB 2. Take a look at the 2 categories of Shapes : Conditions Actions and Terminators/ Notice than we can only create sequential workflows in Visio. Drag and drop a Start and a Terminate shapes into the design surface : Now we will query information provided by the user when the workflow starts : drag & drop a Compare Data Source Shape between the Start and the Terminate shapes. Start Microsoft Visio 2010 and click on the FlowChart template category to select the Microsoft Sharepoint Workflow template. 1. 2.
Let’s connect the shapes by selecting Connector from the Ribbon: Double click on each shape to modify the internal text as described in the picture below : .
click on the Process Ribbon and select the Check Diagram menu item: You will get several issues: Right click on the connector and select Yes or No (only one is enough): .When we have a condition shape with several connectors. at least one of the connector must have a label that says “yes” or “No”. indeed.
Save the Visio File (File_save menu) and Export it by selecting the Export menu item in the Process Ribbon : Provide a name like MyFirstVisioWorkflow (notice the .vwi extension :” Visio Workflow Interchange” format): .
click Next and select No for the default value. the workflow will show up in the designer: Let’s create an initiation form where we will ask the user if the information is important or not: select the Initiation Form Parameters Ribbon option in the Workflow Ribbon. add a field and name it Important. select the type Yes/No. In the Workflow Designer replace the first value with: .Start Sharepoint Designer 2010 and open the http://litware web site. Click on the Workflows site object and on the Workflows Ribbon select the Import from Visio ribbon item: Import the workflow and associate the workflow with the Announcement list.
save the workflow .Replace this test with Equals and the other value with yes : Replace this message with Important and not important: Name the workflow step MyFirstWorkflow.
select an existing announcement and start MyFirstVisioWorkflow. and check the workflow history (in the beta 2. Go to the Announcements list. the workflow visualization may generate an exception) . check the option “Show workflow visualization on status page”: Publish the workflow. In the workflow Summary page.Save the workflow (don’t forget to Publish). fill in the Initiation form (Check important).
rules) and a Visio diagram.xoml.Export the workflow to Visio by selecting the Export to Visio Ribbon item. Let’s take a look at the .xoml and workflow.vwi file by renaming the file with a . .zip extension It is a simple container for 2 workflow files (workflow.
It is important to know that if we had chosen sandbox solution. Create a new empty Sharepoint 2010 project.NE T FORMS 1. the Sequential Workflow or State Machine Workflow would have been disabled. create a new Sharepoint Workflow Diagram. and in the Process Ribbon. open the Elements. Add a new SPI based on the Sequential workflow template. the file will show up in Visual Studio 2010 Workflow Designer. keep the default name workflow1. select Import : LAB 3. To import a vwi file from Visio 2010. The workflow cannot automatically start as it is the case for a workflow running on a list.xml linked to the workflow file. In Solution Explorer. You will see a new Tag : AssociationCategories : . name the project VSWorkflowLab1.If you click on the workflow.xoml.CREATE A SIMPLE WORKFLOW WITH VISU AL STUDIO AND ASP. Select Deploy as Farm solution and the web site should be http://litware. Let’s keep the Site Workflow Option.
aspx and add a TextBox called MaxAmount in PlaceHolderMain.microsoft.aspx.14).com/enus/library/aa543430(office.Other options are available.aspx and add a Textbox called Amount in PlaceHolderMain: Edit the Elements.aspx. Repeat the same procedure for a WorkflowInitiation Form and name it WorkflowInitiationForm1. To add the Association and Initialization forms.xml file and provide the association and initiation forms urls in the Worflow element: . you will find more details here: http://msdn. Open WorkflowAssociationForm1. select Add and add a Sharepoint “layouts” Mapped Folder : A new Layouts folder with a VSWorkflowLab1 subfolder to your project will be generated : Right click on the VSWorkflowLab1 subfolder and add a new Item: WorklflowAssociation Form: keep the default name WorkflowAssociationForm1. Open WorkflowInitiation1. we have to create a mapped folder: right click on the project .aspx.
go to Site Actions-Site Workflows and click on your workflow: Let’s update the workflow Association Form’s GetAssociationData Method: Let’s update the workflow Initiation Form’s GetInitiationData Method: . This is a site workflow. To start the workflow. Click on your workflow name. therefore go to Site Actions-Site Settings-Workflow Settings to take a look at the Workflow Association. click on the Next button to display your association form.Build and deploy your solution.
LAB 4. deploy and test your site workflow. Create a new Sharepoint 2010 Visual Studio project from the Sequential Workflow template and name it HelloWorldSequentialv10. Create a function that check the workflowProperties. In this lab. but also a task form that will override the default task form layout.Drag & drop a LogToHistoryList activity to the workflow surface Bind the HistoryOutcome property to a new field called HistoryOutCome. listen to task changes done by the user and complete the task.InitiationData is less or equal to workflowProperties. You workflow should look like this: .CREATE A VISUAL STUDIO SEQUENTIAL WORKFLOW THAT CREATE TASKS 1. we will add and invoke association and initiation form.AssociationData. Drag and drop a CompleteTask. Add an event handler to the OnWorkflowActivated activity and invoke this function from the event handler. CreateTask and OnTaskChanged activities to the workflow surface: 2. In the next lab. this workflow will create a task.select a web site and a specific list to associate your workflow with. store the return value into the HistoryOutCome field previously created. Keep the default activities names. Save.
The first thing to do is to associate a new correlation token. Explaining correlation tokens is beyond the scope of this course. display its properties windows set the CorrelationToken value to taskToken1 (you are free to choose any name): Click on CorrelationToken and set the sub property OwnerActivityName to workflow1. you will get more information about how to fix it. if you click on the red balls. . Select createTask1.You will notice a warning message on most activities. which is a kind of cookies that group activities working together. which is the workflow class name.
Go to the workflow1 code behind and add a new Guid property .Set the CorrelationToken property of the onTaskChange and completeTask to taskToken1. click on the ellipsis (…) button and the following window will show up: . that will provide your task with a unique number : The TaskId property of our 3 new activities will be data bound to task1Guid : Select the TaskId property. task1Guid.
The task that we will create needs additional information like a description. select its property Taskproperties and bind it to new member that can be named TaskProperties1. Select the CreateTask1 activity. Sharepoint provides a the class SPWorkflowTaskProperties to wrap these informations. Click OK and take a look at the generated code. . the user that should execute the task. and other custom information that you might need.
set the following value of Taskproperties1 : Open the Features Designer. click on the CreateTask1 activity and go to the code editor. Go to your web site-Site collection features and make sure your feature is activated. deploy your project. check your feature scope (should be Site) and name. you will see the workflow status & history: . select a list item and click on the Workflow picture in the Ribbon : Select the workflow in the list of workflows associated with your list : Click on your workflow to start it and you will notice that a new column with the workflow association name has been created in your list: If you click on the In progress status).In the workflow designer. Go to the list your workflow has been associated with.
an event will be sent to the workflow that will come back to life and will move to the next step. . In our workflow. If you click on the Edit Item menu. the next step will set the Task status to Complete. when the workflow is idle. it is automatically persisted (with its properties state) into the content database. modify the task (this is optional).You will notice that a task has been created : click on the task hyperlink (you can also go directly to the Tasks list) and the task dialog will show up : The workflow is now waiting for your task to be changed. and click on the Save menu.
CREATE A VISUAL STUDIO SEQUENTIAL WORKFLOW USING INFOP ATH FORMS 1. Grab the Infopath forms from your starter folder and add them into your Workflow1 Sharepoint project item folder In order to deploy these forms with our feature. set their Deployment Location property to Element File : . 2. Load the project from your Starter folder.LAB 5.
InstanciationUrl and ModificationUrl attributes will specify the system page to invoke to load the association. instantiation and modification forms respectively. to do this you first need to find out each form unique Id : open your form in the Infopath Designer by right clicking on it on the file system and select Design: . TaksListContentTypedId will provide a new task Content type for the task created by the workflow. We still have to specify the Infopath Forms to load.xml file and add the following attributes: The AssociationUrl.Open Elements.
go to the File-Info Menu and on the right side of the screen.In Infopath Designer 2010. select Form Template properties : In the Form Template properties dialog. copy the ID: .
Microsoft provides an out of the box class that must be defined in the Feature. Open the feature in the Feature Designer.xml file.xml : (uncomment the tags generated by Visual Studio 2010) Another requirement is to specify which class in which assembly will be in charge of loading the Infopath Forms. and click on the Manifest button: .And paste it in Elements.
When you click on the manifest link.xml will show-up.txt (in your Starter folder) In the same file. click on it : Copy and paste the code provide in the script1. the file feature. but also another button: Edit Options. add the following Property Key that will ensure that your Infopath forms will be registered in Sharepoint: .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.