Sunday, January 29, 2012

Workflow Enhancements in SharePoint 2010

http://msdn.microsoft.com/en-us/sharepoint/ff420382.aspx#lesson1

  • Visio visualizations
  • Reusable declarative workflows
  • Task processing including escalation and parallel processing
  • Ability to add required fields to lists on the fly – called “Association fields”
  • Visio Visualization is only available for SharePoint Designer Workflows
  • OfficeTask?
  • SPD Save button only saves locally, doesn’t send to SharePoint
  • Visio cannot edit details of the workflow like field names and what not
  • Workflow event receivers can apply to site, root web, web, lists or list template scope – WorkflowStarting, WorkflowStarted, WorkflowCompleted, WorkflowPostponed
  • Sandboxed workflows do not require .actions file, they have actions element inside feature
  • Workflow EDE – can communicate with 3rd party services to raise events that wake up workflow
  • in vs2010 designer green activities have incoming data and blue activities have outgoing data

Workflow Modification Forms

http://msdn.microsoft.com/en-us/library/ms480794.aspx

  • May want to modify workflow to add or remove tasks…
  • Workflows have one or multiple EventHandlingScope activities. If an EnableWorkflowModification activity exists inside an EventHandlingScope activity, a link will appear in the edit workflow form to the workflow modification form. A guid inside the EnableWorkflowModification activity must match the modification form.
  • Urls do not support Link Fixup

Workflow Forms Overview

http://msdn.microsoft.com/en-us/library/ms457061.aspx

  • Can use any forms technology that can access API for task xml data.
  • Workflow DLL and forms are independent except for workflow modification forms, which require a guid of the form for the workflow modification.

MCM Studies – SharePoint Foundation Workflows

http://msdn.microsoft.com/en-us/library/ms434426.aspx

· Workflow template definition

· Contains general information about the workflow including references to any DLLs or custom forms.

· Workflows can associate with a list, document library or content type. Can a workflow actually associate with a SPWeb?

· Can a custom workflow template be initiated when a major version is published like the default templates are?

· Where in the UI can I specify who has rights to run the workflow? Do these rights apply to change/create as well?

· Associations exist in the workflow associations database table.

MCM Studies – Workflow Tasks

http://msdn.microsoft.com/en-us/library/ms438856.aspx

· All task content types are based on WorkflowTask content type.

· For ease of programming, we strongly recommend that developers create content types for their task types, and that each task content type schema exactly match the schema of its designated edit task form. This approach provides one-to-one mapping of properties, and eliminates the need to parse the extended properties field to extract additional values.

· A workflow template definition can have either a single task content type defined for the entire workflow or instead an activity, CreateTaskWithContentType can create a task with a specific content type id.

· Custom new/edit/display forms are possible for task content types by customizing the XmlDocuments region of the content type schema

· Workflow definition file has an idea of a task type – integer id that can associate a task with a form and a content type?

· Custom forms for content types can be either FormTemplates or FormUrls – formtemplates are ascx controls and formurls are aspx pages.

· Workflowtask content type has an Xml field that stores the task xml that is sent to the custom IP form as a secondary data source.

· Developer note – when a form is submitted the developer should call AlterTask

MCM Studies – Workflow Stages

 

http://msdn.microsoft.com/en-us/library/ms479274.aspx

· Workflow templates are installed per farm but must be activated for a site collection by SCA.

· Can use workflow initiation form to specify who has the rights to initiate a workflow

· The workflow association is stored as a property of the list?

· The first time a workflow is run on a list a new read-only field is added of type workflowstatus with a customizable name defaulted to the workflow name

· Workflow stages are divided into tasks with customizable schemas beyond the default Task content type

Sunday, January 15, 2012

SharePoint and Office Document Save Location

I got a question on the forum that I was actually ready to answer (a rare occurrence J). The person was asking about how to control the location an office document saves to when the user clicks Save or Save As. Turns out its in the URL that opened the office document in the first place.

https://SITE/_layouts/CreateNewDocument.aspx?id=https://SITE/Shared%20Documents/Forms/template.dotx&SaveLocation=https%3A%2F%2FSITE%2FShared%20Documents&Source=https%3A%2F%2FSITE%2FShared%2520Documents%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1

Taken from fiddler. See http://social.technet.microsoft.com/Forums/en-US/sharepoint2010general/thread/4553d167-614f-48df-bb2f-d59daf06e25a for details.