Welcome to MSDN Blogs Sign in | Join | Help

Introduction to SharePoint Workflow!

Hi Everyone!

My name is Eilene Hao, and I’m a Program Manager on the Office Document Lifecycle workflow team, specializing in custom workflow development. I’m really excited to meet you all, and I hope that you’ll find this blog entry helpful and that you’ll continue to journey with me in exploring the wonderful world of workflow!

In this entry, I’d just like to give you a general overview of SharePoint workflow (both Windows SharePoint Services and Office SharePoint Server), more specifically, our guiding principles for workflow in this release and some workflows that come out-of-the-box with SharePoint Server 2007. So without further ado, here we go!

Your first question might be, “What is workflow?” Well, I would define a workflow as a business process, a chain of steps that need to be performed in order to accomplish a goal. Every business is filled with numerous processes whether it’s getting a contract approved, hiring a new candidate, or processing an order from a catalog.

The problem is that it’s oftentimes burdensome for workers to remember the exact process, keep track of everything, and manually move it along, especially if it's not something they do very often. They’ll have questions like, “So I’ve done my part; who do I contact now? What’s the next step?” Also, for the person overseeing the process, after it gets to the nth person in the chain, it’s really hard to see what the status is or what’s going on. A system that supports workflow is one that helps drive these processes (to help users focus on their tasks and not the details of the process) as well as tracks progress and events (to provide visibility into what’s happening).

For the 2007 release of SharePoint, we wanted to provide an infrastructure that would drive process around what SharePoint does best: share and collaborate on documents. So, we focused on document-centric workflows, processes that a particular document needs to go through during its lifecycle, such as being reviewed and edited or being approved for publication. Thus, you would attach and run a process directly on a SharePoint document or list item. We also focused on human-based workflow, meaning that SharePoint workflows are task driven and focus on human interaction, rather than just automating programmatic steps.

I’ll save the details of interaction for a later post, but here’s a quick illustration of these concepts. Let’s say that I’ve written an article that needs to be approved before I publish it. I can start an Approval workflow on the document and select the people whom I need to approve it. The workflow will then assign approval tasks to those people. The approvers are notified of their tasks via email and can complete their tasks by clicking approve or reject on a special form provided by the workflow. When everyone has approved, I get a notification telling me that my document has been approved, and I can then publish it.

To help people get started with scenarios like these, we’ve taken some common processes we’ve seen in our research and built those workflows into SharePoint Server 2007 out-of-the-box for people to use without IT involvement. These out-of-the-box workflows include:

  • Approval: Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document.
  • Collect Feedback: Routes a document for review. Reviewers can provide feedback, which is compiled and sent to the document owner when the workflow has completed.
  • Collect Signatures: Gathers signatures needed to complete an Office document. This workflow can be started only from within an Office client.
  • Disposition Approval: Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.
  • Group Approval: Similar to the Approval workflow, but uses a designated document library and offers a personalized view of the approval process(es) in which a user is participating. This workflow provides a hierarchical organization chart from which to select the approvers and allows the approvers to use a stamp control instead of a signature. This solution was designed specifically for East Asian Markets.
  • Translation Management: Manages document translation by creating copies of the document to be translated and assigning translation tasks to translators.
  • Issue Tracking: Manages the issue tracking process by creating tasks for Active issues assigned to users who own to a given issue. When the task related to an issue is complete hence resolving the issue, the creator of the issue is assigned a review task so that the issue can be closed.

We know that a lot of processes are very specific to an individual company’s needs, so in order to provide an extensible infrastructure that can be used to create sophisticated workflows, we decided to use Windows Workflow Foundation (WF) as our workflow engine and process framework. WF provides a powerful platform with a unified programming model and works with familiar development tools such as Visual Studio. SharePoint workflows can also be created with SharePoint Designer, a web design and customization tool that lets you create workflows without writing any code.

Well, that’s SharePoint workflow in a nutshell. Do you want a more in-depth look? Then head over to the new ECM Team Blog and subscribe to it. I’ll be posting over there about the new ECM Starter Kit and provide a much more detailed look at some of our out-of-the-box workflow solutions very soon.

-Eilene

Published Wednesday, June 07, 2006 10:41 PM by sptblog
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Introduction to SharePoint Workflow!

Thank you very much for this article. I've been hearing for months that SharePoint 2007 has workflow built into it, but I didn't really understand the value of it. Great article.
Wednesday, June 07, 2006 10:32 PM by Cody Schouten

# re: Introduction to SharePoint Workflow!

Very cool stuff I've been playing around with it... One thing I couldn't find was if there was the ability using the "SharePoint Designer" to move a document from one library to another on an event? Like if the doc was approved to move it to a library that more people had access too.
Thursday, June 08, 2006 12:34 AM by CK

# re: Introduction to SharePoint Workflow!

You can use the "Copy Item" and "Delete Item" actions in the designer to "move" the document.  You can also write a custom activity that does this using the object model and import it into SPD.
Thursday, June 08, 2006 1:58 PM by Eilene Hao

# Tech Talk PT » Blog Archive » Introduction to SharePoint Workflow!

# re: Introduction to SharePoint Workflow!

Thank you, Eilene. Great intro to SharePoint workflow.

SharePoint Designer deploys workflows as XML and compiles it on-the-fly. What’s the implication of this in terms of performance? Will the same workflow created by Visual Studio perform better because it’s compiled into assemblies and deployed in the GAC? Is there a pre-compiling and caching mechanism for SharePoint Designer workflows similar to how execution plans are generated for SQL Server stored procedures?
Friday, June 09, 2006 5:32 PM by Hao Zhai

# re: Introduction to SharePoint Workflow!

I get the clear concept of workflow, sharepoint office services. thank you for this post..

Monday, June 12, 2006 3:21 AM by Prasanna Vignesh

# The ECM Starter Kit


Hi, everyone!
 
As a follow-up to my “Introduction to SharePoint Workflow” post on the SharePoint...
Monday, June 12, 2006 1:17 PM by Enterprise Content Management (ECM) Team Blog

# 2007 Microsoft Office Server System Reference Material

Download SharePoint Beta2:

Important Documentation Prior to SharePoint Beta 2 Installation
Get...
Monday, June 12, 2006 1:22 PM by The Boiler Room - Mark Kruger, SharePoint MVP

# re: Introduction to SharePoint Workflow!

Great information!  thanks.

Does the workflow also work with InfoPath forms?
Tuesday, June 13, 2006 2:15 PM by Jeanine Flanders

# re: Introduction to SharePoint Workflow!

Yes, Office SharePoint Server workflows work with InfoPath forms, which can be displayed in a browser via InfoPath Form Server or as dialogs inside the core Office client apps. (keep an eye out for a post on the ECM blog for details;)).  However, Windows SharePoint Services workflows do not and can only use aspx forms.
Wednesday, June 14, 2006 4:13 AM by Eilene Hao

# re: Introduction to SharePoint Workflow!

How to trigger a SharePoint workflow when an item in the list is deleted?
In SharePoint designer you can associate an workflow only on CREATE and MODIFY events... very strange that the DELETE was left out...
Friday, June 23, 2006 1:10 PM by Mihai Durcau

# re: Introduction to SharePoint Workflow!

Ok, but explain how workflow would control a document that requires certain information to be hidden or displayed differently. Additionally, how would you take this workflow and place it in a new blank project? This all seems to be template driven?
Tuesday, June 27, 2006 11:59 AM by David DeWell

# re: Introduction to SharePoint Workflow!

Additionally, I know there are plans to have security in these classes but the even the "DoesUserHavePermission" property is still a Todo. Unfortunately, it is in Beta so we may never know until it hits market. All I know is I have not been able to use WWF to create a proper workflow in Sharepoint 2007 as of yet without manually coding it myself.
Tuesday, June 27, 2006 2:37 PM by David DeWell

# Walkthrough: Using the SharePoint Server 2007 Approval Workflow

Hi everyone,
As promised in my intro to workflow post on the SharePoint blog, I'd like to walk...
Wednesday, June 28, 2006 6:59 PM by Enterprise Content Management (ECM) Team Blog

# re: Introduction to SharePoint Workflow!

Hi guys, thanks for your comments:)  Let me try to answer some of your questions.

Hello Mihai, with regards to the triggering on item deletion, keep in mind that each workflow binds to an item, so if the item is deleted, there's nothing to start that workflow on.  This is why the "start on delete" option is not available.  However, an already running workflow can listen for the event that its item is deleted, so as an alternative, you can have a workflow run on the item when it's created that waits for the deletion and then does its thing.  To get this functionality in SPD, you can code an action that uses the OnWorkflowItemDeleted activity in Visual Studio and import it.

Hi David, I'm not sure I understand your question, but in general, you can code your workflow to parse and process documents, properties, lists, etc. by using the SharePoint object model and other methods of choice.  So since you have access to the document itself, you can hide text or format it as you wish during the workflow execution.  You can create workflows for SharePoint using the normal WF VS designer and SharePoint activities that handle events, manage tasks, etc.  If you're interested, we have some custom workflow samples and project templates in the ECM Starter Kit (see above) that might help you get started.  As for DoesUserHavePermission, it should be implemented; it may just appear to be a todo because the intellisense documentation isn't implemented yet;).  Actually, pretty much all methods should be implemented, so if you find bugs, do let us know.
Thursday, July 06, 2006 3:24 AM by Eilene Hao

# re: Introduction to SharePoint Workflow!

Does this approve and reviewer functionality stand up in a court of law around reconciliations and financial type reviews that are required for the Sarbanes-Oxley Act.  We are thinking about implementing the workflow as evidence or preparation and review of financial documents, but are not sure if the electronic documentation would suffice in a court of law.  The current process is to print out financial documents and sign-off manually, which is very manual but legally seems to be what will stand up in a court of law (the handwritten original signature).  
Tuesday, July 11, 2006 3:20 PM by Carol Puszewski

# re: Introduction to SharePoint Workflow!

Hi Eilene,

Is it possible to set up a workflow (with SharePoint Designer),
which will automatically approve a document or article page, if a certain field in the item is set? I've tried to set up such a workflow, but it always fails with an Access Denied:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

The workflow is as follows: if a user creates a new article and sets a specific site column for the article: displayforalluser = no, then the article should automatically be approved when it is submitted for approval.

Your help is much appreciated.
Friday, July 14, 2006 5:59 AM by Lasse Bisbjerg

# Give me a B, Give me a P, Give me a M - What's that spell - BPM!

If you haven't seen it yet, we launched a new Business Process Management site at http://www.microsoft.com/bpmEven...
Friday, July 21, 2006 10:31 AM by Tom Rizzo's SharePoint Blog

# re: Introduction to SharePoint Workflow!

Hi Carol and Lasse,

Carol, let me preface this by saying that I'm not a lawyer, so this may not be completely accurate, but I'll try to give some recommendations on what I think might work in this case.:)  You should definitely consult with a lawyer to get the scoop and recommendation for your location and the situations you think you'll encounter.

While I believe you could use workflow for signoff, I wouldn't recommend it as the primary method if you need a strong case.  I would recommend digital signatures with workflow to support.  Here are more details on what I mean:

I believe workflow could be used to audit signoff, as long as it's implemeted correctly and takes the right security measures.  For example, you need to make sure that your custom workflow secures the approval tasks so that only the approver can edit it. As long as the user's account hasn't been compromised, SharePoint permissions would probably hold up in court.  

However, if brought to court, it may be hard to prove that your custom implementation of the workflow you're using is bulletproof. Digital Signatures on the document itself that use certificates from trusted vendors, on the other hand, would be much stronger.

I'd recommend using digital signatures in the document and having the workflow route the document to collect the signatures.  This way, you can use electronic documents, use workflow to facilitate the process, and know that you have something secure.

You might also want to use some of our other records management and policy features baked into SharePoint Server like auditing and holds, which were created to assist with legal purposes.  If you use these, you can track every read or edit, and combined with workflow, this would make a case even stronger.  For more information about these features, take a look at the Records Management team blog at http://blogs.msdn.com/recman/ :)

Lasse, yes, this is definitely a scenario you could implement in SPD.  Set the workflow to auto-start on creation/change, use a conditional, then the Set Field action to approve it. I'm guessing this is a permission eror.  Is this happening when you click Finish and it's trying to deploy to the site?  You need to be a list administrator on the list you're trying to deploy the workflow to.  Make sure you have the right permissions.  If it still doesn't work, let us know and we can try something else.:)

Hope this helps,
Eilene

Saturday, July 22, 2006 8:10 AM by Eilene Hao

# re: Introduction to SharePoint Workflow!

Hi everybody,

How to set automatically rejected shared document when upload document.
Monday, July 24, 2006 2:52 AM by Jobs

# re: Introduction to SharePoint Workflow!

Hi Eilene ,

I saw your demonstration of how to create workflow in VS 2005 for sharepoint. I created the workflow, filled feature.xml and workflow.xml and install.bat files properly.Ran the install.bat file.It gave completed successfully without any error.When I went in sharepoint site and workflow setting to add a workflow,I saw my workflow.So selected that and clicked on "ok" button.It is giving error that "The form cannot be displayed because session state is not available. ".
Please advise me on this. I need to show the demo  to my client urgently.
Tuesday, July 25, 2006 6:21 AM by Vrushali Ranjalkar

# re: Introduction to SharePoint Workflow!

Hi Eilene,

I watched your webcast (Developing SharePoint Workflows Using Visual Studio 2005) today, and am playing around with the ecm-samples. I want to assign a task to a group, where one of the group can complete the task, like it is with the feedback workflow. How can I achieve this? What do I need to give as "assignedto" when creating the task?

Great webcast btw.
Thursday, July 27, 2006 9:40 AM by connex

# re: Introduction to SharePoint Workflow!

Eilene,

Hello I saw your presentation at devcon about creating workflows w/ visual studio 2005, great job.  I have recently been trying to create a work flow for sharepoint beta 2 and am not having any luck following the examples on the devcon dvd or anything else I have found on msdn thus far. Are there any new examples you are aware of that work with the beta 2 release? Any info or links would be greatly appreciated.

Thanks!
Friday, July 28, 2006 6:50 PM by Mark Collins

# re: Introduction to SharePoint Workflow!

I am evaluating MOSS, and used the Sharepoint designer to create  a few workflows, but was unable to create a workflow to move a document from one doc lib to another / accross servers to another MOSS site.

Is it possible?
Tuesday, August 01, 2006 1:49 PM by Stephan

# re: Introduction to SharePoint Workflow!

Hi guys!  Sorry I've been away!  Here are some answers for you:

Jobs, you can create a workflow that automatically starts when an item is created.  Have the workflow delete the item.  It's pretty easy to do with SharePoint Designer.  In any case, you'll want to check the "Automatically start when an item is created" checkbox in SPD or the association page.

Vrushali, make sure you have an SSP (Central Administration->Application Management->Create or Configure this farm’s shared services) for your site.  Also, you can make sure that session state is enabled by going to Central Administration->Application Management->Configure Session State.

Connex, to assign to a SharePoint group, you just need the group name.  So for example, if you want to assign a task to Home Members, you would say taskprops.AssignedTo = "Home Members".  The claim task option should be available automatically.

Mark, the ECM Starter Kit linked to in the entry has a bunch of VS samples for Beta 2.  Also, there is a walkthrough for Hello World at http://msdn2.microsoft.com/en-us/ms564355.aspx that you might find helpful:)

Anyway, hope this helps!  Let me know if you have more questions.

Thanks,
Eilene



Sunday, August 06, 2006 9:24 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

Hi Eilene,

With the OOB Approval workflow it is possible to select ""Start this workflow to approve publishing a major version of an item."

However whenever I make my own custom workflow and/or implement on of the sample workflows in the starter kit this option is disabled.

Is there a chance you can give a hint of what needs to be implemented in the custom workflow to have SharePoint allow this option?

Thanks in advance,

Ashley  

Thursday, August 17, 2006 2:51 AM by Ashley Latham

# re: Introduction to SharePoint Workflow!

I would like my custom workflow to be started whenever a user tries to approve a document. However when I try to add my workflow the check box "Start this workflow to approve publishing a major version of an item." is always disabled.

Is there some special way i need to set up my workflow to enable this?

Thanks
Thursday, August 17, 2006 10:54 AM by Tasman Bleechmore

# re: Introduction to SharePoint Workflow!

Just because Im such a nice guy Ill answer my own question. You need to stick this line in your Workflow.xml.

I have abbreviated for the sake of clarity

<MetaData>
     ...
     <AssociationData>...</AssociationData>
     <StatusPageUrl>...</StatusPageUrl>
     <InitiationType>Manual;#OnNewItem;#OnItemUpdate;#OnMajorCheckIn</InitiationType>
</MetaData>
Thursday, August 17, 2006 5:46 PM by Tasman Bleechmore

# re: Introduction to SharePoint Workflow!

Hi Ashley and Tasman,

It's actually not (just) the workflow that needs to be set up; you have to set up the library itself correctly to enable this:-D.

Go to List Settings->General Settings->Version Settings and make sure major and minor versions is turned on.  This should enable the check box.

Yes, the InitiationType tag is important too (I think if you leave it off, the default is that all options are enabled, but it definitely comes in handy if you need a specific combination).

-Eilene
Friday, August 18, 2006 10:26 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

I've been trying to get Collect Signatures workflow (the default one in  Sharepoint2007) to work.  If you choose that workflow there is no next page that asks you for the users to send the form to for signatures.  If I put an Infopath2007 form in the folder and set the workflow and edit the form the workflow is not started.

How do you use this workflow?  Thanks.
Friday, August 18, 2006 10:48 PM by Scott

# re: Introduction to SharePoint Workflow!

Hi,

I try to get work the OnItemChanged activity but there is no documentation ...

Is it possible to have some help ?

Thx
Monday, August 21, 2006 11:03 AM by frederic belloc

# re: Introduction to SharePoint Workflow!

Collect signatures needs to be started from the client application (I believe Word or Excel) on a document that has Office 2007 signature lines in it.  Open your server document, go to big button->Workflows, and select Collect Signatures.  This should pull up a form that lets you specify email addresses for each signature line in your document.

OnItemChanged has been removed post Beta 2, so refrain from using it.  Use the CallExternalMethod activity and the InitializeForEvent method in the list item service channel on existing items to register the workflow for events on that item, then use the HandleExternalEvent activity for the events.  These may be buggy until RTM, so hang in there...:(
Tuesday, August 29, 2006 9:36 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

As a Gold Microsoft partner I downloaded Sharepoint 2007 last week.  I'm most interested in the workflow abilities in the upcoming release of Sharepoint.  I'm having a problem with the workflow I created though.  I created the workflow with Sharepoint Designer 2007 and each time I run it from the Sharepoint site it says that "An error has occured in [workflow name]".  I have no idea what the error is unfortunately.  All I'm trying to do is upload a file to a Sharepoint documents list and then create a ToDo for a specified used in my workflow.

Has anyone encountered this issue?  I can use the built-in workflows within sharepoint to set-up an approval for a document without errors.
Wednesday, August 30, 2006 12:30 PM by Joshua V

# Understanding Workflow in Windows SharePoint Services V3 and the 2007 Microsoft Office system


&amp;nbsp;&amp;nbsp; We’ve received numerous inquiries via this blog and elsewhere for information on “how...
Wednesday, August 30, 2006 5:53 PM by Microsoft SharePoint Products and Technologies Team Blog

# Understanding Workflow in Windows SharePoint Services V3 and the 2007 Microsoft Office system

&amp;nbsp;&amp;nbsp; [Reposted from the SharePoint Team Blog]
&amp;nbsp;
&amp;nbsp;&amp;nbsp; We’ve received numerous inquiries...
Wednesday, August 30, 2006 6:03 PM by Enterprise Content Management (ECM) Team Blog

# re: Introduction to SharePoint Workflow!

Is there any documentation produced in regards to how to add custom actions to Sharepoint Designer?
We have limited development skills & I am trying to establish an enviroment here so that our IT guys only need to use SPD for workflow development. However, I need to be able to create custom actions (i.e. assign tasks to each member in AD group) so that I can overcome 'roadblocks'. Although messy, most of our business processes can be supported with SPD WF & lists.
Any information on how to do this would be greatly appreciated!
Wednesday, August 30, 2006 11:30 PM by cy w

# re: Introduction to SharePoint Workflow!

Josh,

Concerning your error.  I had the same error, and it seems like it had something to do with form services on the sharepoint installation.  

When you created your site collection, did you create it under "sites/mynewsite" or under root.  I found after creating another one under root, my workflow worked on that site, but not the other.  

The main thing I tried was to access the forms services web service on the first site, and I was uanble to browse to it.  Once I created a new site collection under the root I was able to browse the service there.

Hope this helps.
Thursday, August 31, 2006 1:13 AM by Stephan Human

# Workflow in Office System 2007

A lot of questions regarding workflow capabilities in Office System 2007. We recently published a whitepaper...
Thursday, August 31, 2006 3:32 PM by Arpan Shah's Blog

# Business Process Management: MOSS and Biztalk

As the MOSS story unfolds I continue to get a number of questions about our BPM story.&amp;nbsp; Customers...
Thursday, August 31, 2006 9:05 PM by Steve Caravajal's Ramblings

# re: Introduction to SharePoint Workflow!

Hi Eilene,
Can we invoke the MOSS OOTB "Approval" workflow from a custom workflow. Visual studio 2005 provides an action called Invoke Workflow. Using that action, can we invoke the Approval workflow?  The OOTB Approval workflow satisfies a part of my requirement.
MOSS has very good Approval workflow.
I want to leverage the Approval workflow by adding custom actions prior to the approval by creating my custom workflow and then leave the process of approval to the OOTB workflow. This seems possible conceptually with InvokeWorkFLow action.  But I dont know how to proceed forward. Any help will be greatly appreciated.
Friday, September 01, 2006 2:21 PM by Kiran

# re: Introduction to SharePoint Workflow!

Hi Eilene,

I have created a List. In its workflow settings > Add a Workflow Page , I am filling in all the required details. I selected "APPROVAL", default workflow template.
On next page I am getting  "Unknown Error".

Page URL
CstWrkflIP.aspx?List={67825E44-A12E-4D08-8805-73529FA0F0E7}&_CookieSentinel=1.

Please advise me.
Saturday, September 02, 2006 6:32 AM by Sachin Dekate

# re: Introduction to SharePoint Workflow!

Joshua, the error can mean a number of things.  Stephan gives a great suggestion.  If that doesn't work, to debug, you can also try deploying the workflow an action at a time to see which one is causing the error to happen...  

cy, to import activities into SPD, try the following steps:
1) Promote properties in your activity in VS
2) Add an xml entry to an .actions file in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow\wss.actions  (see math activity as an example), or use your own .actions file in the same directory (recommended).
3) Add the activity dll to the web.config file in one of the web.config files in C:\inetpub\wwwroot\wss\virtualdirectories (search for Microsoft.sharepoint.workflowactions in the files and put it adjacent to those)

Kiran, unfortunately, I don't have any experience with InvokeWorkflow.  Perhaps you could call the workflow by extracting the dll from the gac and selecting the workflow as the target, but you'd probably have to tweak your workflow.xml to use the same forms as the original.

Sachin, are you using MOSS or core WSS?  If you're using core WSS, you won't have that page, so you'll need to specify a different custom aspx page for your association url.  If you are using MOSS, then there's probably something else going on, so let us know if that's the case.
Friday, September 08, 2006 3:41 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

I encountered a problem where only administrator can start the workflow which I have designed using SharePoint Designer. When a different user start the workflow, it will hits error.
Thursday, September 14, 2006 7:13 AM by Patrick

# re: Introduction to SharePoint Workflow!

Hi Eilene,
Thanks for your response.
I am trying to customize State Machine Approval Workflow  given with the ECM starter Kit. This workflow works well if I give approver user ids in the association/initiation form.

Instead of regular user ids, I want active directory groups to be my approvers.  The reason why I want to assign AD group as approver is because, I want to have the claim task functionality.            

Any person within that approvers AD group, would log in and then see the task in the Assigned to my groups view. The user then clicks on the task and claims it. The process of claiming a task is firing the OnTaskChanged event. And the workflow proceeds to the next state.

I dont want to expand the group and then assign tasks individually to all members. (hence I did not use replicator task)I just want to assign the task to group and then first person in the group who sees the task would claim it.  


How can I assign a task to a group and then make one person claim the task and approve the task?
Thursday, September 14, 2006 2:42 PM by kiran

# re: Introduction to SharePoint Workflow!

Hi Eilene,

I need to assign a task to a SharePoint group, but only a member of the group is required to execute the task. I followed your instructions and set taskProps.AssignetTo = GroupName. the task is being assigned to the group; however it doesnt appear in the task list for each member. How this action can be done. Furthermore, when somebody executes the task, it should be removed from the task list of others. so how can we perform all these actions?

Thanks in advance
Ismail
Friday, September 15, 2006 8:16 AM by Ismail Zein

# re: Introduction to SharePoint Workflow!

Hi all, This is kind of addendum for my previous post.

ECM Starter kit has WSS Task activity. I used this activity in a simple sequential workflow which has only 2 activities:workflow invoked and wss task activity.
In the workflow invoked handler, I assigned the WSSTask to an active directory group as approvers.

When I invoke this workflow, I noticed that the process of claiming task by a person in the AD group is raising the OnTaskChanged event and since this event is not processed inside the workflow, it throws an exception.

I also opened up the OOTB Approval workflow in the Visual Studio (uninstalled the workflow dll from gac and added a reference to studio project and I am able to see the OOTB Approval workflow in Workflow designer )
and noticed that OOTB Workflow uses WSSTask activity. But this OOTB workflow can handle claim task event. Now my questions are:

1)How is the OOTB Approval workflow able to handle claim task? Is the WSSTask activity in the ECM starter kit different than what was used in the OOTB Approval workflow?  Is the WSSTAsk in the ECM Starter kit older code? Will there be a refresh of ECM Starter kit?

2)Considering that WSSTAsk activity code is update, what is the most elegent way to handle Claim Task event?

Thanks a lot in advance    
Friday, September 15, 2006 10:02 AM by Kiran

# re: Introduction to SharePoint Workflow!

OOTB I am getting "The list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. The assembley strong name is Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublickeyToken=xxxxx. Any ideas?
Wednesday, September 27, 2006 6:34 PM by Jared

# re: Introduction to SharePoint Workflow!

I addressed Kiran's questions in the ecm blog, so head over there if you're interested:) Patrick, this is probably a bug; which build were you running on? Ismail, all workflow tasks get assigned to the same task list. There is a "My Tasks" view for people that allows them to see only their tasks, but if they switch views to "All Items", they should see everything. There are a few approaches I would recommend for this: 1) Set the default view to AllTasks. This way all users will see all tasks, including the ones assigned to groups. 2) Expand the My Tasks view to allow users to see not only their tasks but also groups that they're a part of. 3) Tweak your workflow code to expand the group members and add tasks for each person, then delete all other tasks if any task is completed. The first two are probably easier, but the third would work two (just more complex).
Friday, September 29, 2006 7:15 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

Hello Eilene, First of all thank you for the webcast. It was a great introduction to workflows, and really helped me make a start on writing my own. I would like to ask a question about debugging. How can I debug a workflow that has been deployed on a remote server? I can successfully attach to the w3wp.exe running on the remote server (this is using VS 2005), and I can see my workflow DLL being loaded in the Modules window. However, the problem I'm encountering is that symbols for the workflow aren't loaded -- it's unable to find the PDB files that correspond to the workflow assembly. I've tried to load the symbols manually from the PDB file in my build dir, but it returns an error saying `The symbol file myassembly.pdb does not match the module.' My question is this: how to tell it (whatever is looking for the PDB, in this case, VS, I guess) where to look for the PDBs? Or, alternatively, where to put the PDBs so that they are automatically found? Thank you in advance for your reply. BTW I'm using core WSS. Cheers, Misha
Friday, October 06, 2006 6:41 AM by Misha

# re: Introduction to SharePoint Workflow!

This is an addition to my previous post... Another question I'd really like to ask is: is there any way of telling what went wrong when an error occurs within a workflow? All I get is the message `An error has occured in Simple Workflow.' in the workflow status window. Are there any logs that we can access to find out more about the error?

Thanks again, Misha

Sunday, October 08, 2006 2:27 AM by Misha

# SharePoint Woes

Recently, I've been blessed with the task of writing a workflow for Windows SharePoint Services (WSS) 3. It sounded like a pretty good idea at the start -- workflows make our lives easier by leaving the mundane administration-like tasks to the computer

Sunday, October 08, 2006 9:05 PM by Serious Sam's Serious Thoughts

# Workflow in Office System 2007

There are a lot of questions regarding workflow capabilities in Office System 2007. We recently published

Thursday, October 12, 2006 12:30 PM by Arpan Shah's Blog

# Bug in SharePoint? ExtendedProperties Propagation

While working on my WSS workflow, I've noticed that the SPWorkflowTaskProperties.ExtendedProperties hashtable isn't propagated to the SPListItem.Properties hashtable of the corresponding task. This MSDN document says that it should: QUOTE:If a value'

Friday, October 13, 2006 3:12 AM by Serious Sam's Serious Thoughts

# re: Introduction to SharePoint Workflow!

Misha, yes, you can look at the ULS logs, which are located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS (may be slightly different depending on partitions and stuff).  I usually scroll to the bottom of the latest log and do a search up for workflow.  Also, if you set a breakpoint in VS and attach to process, you should see an exception if it's something with your code.

Serious Sam, thanks for your feedback and entry!  It's always good to see what the biggest pain points are so that we can provide better solutions for you guys.  Hopefully I can help somewhat.

Regarding your assembly not loading, you have to be sure that the currently compiled version of your project dll has been installed to the GAC (i.e. no *'s on any of your files after you compile and install).  Just one letter off, and VS will not recognize the loaded assembly as the one that matches your code.  Do an iisreset to make sure that new assembly is loaded.  After the reset, attach to all w3wp processes (open a doc lib to spin one up) and once you start your workflow, as long as it doesn't fail to start, it should load your symbols.

There are more verbose messages in the ULS log (see response to Misha above).  We don't have them in the history items for status for a couple reasons: a) status is meant as a feature to help visibility into business process for general users, not developers/administrators, so a verbose message would confuse people, and b) sometimes exceptions may contain sensitive data, so we'd rather leave it up to developers to specify if they want to write out that information.  The ULS log is the best way to go, but if you want to use history as debugging tool, you might try adding some try/catch statements around trouble spots and using a LogToHistoryList activity to write out caught exceptions (use the OtherData field, since Comments are restricted to 256 chars).  In MOSS, we've got an error report for excel that might help filter this data.  By default, we leave the hefty verbose stuff in the real error logs.

As for remote debugging, unfortunately, it isn't a supported scenario.  There are a few reasons for this: a) you need SharePoint dll's that only live on the server box, b) you'll have to remotely deploy to the GAC, c) a lot of changes involve iisreset, which can be random and screwy for multiple remote developers who are working at the same time, and d) debugging against farm configurations is hard because you'll have to deploy to all front-ends.  Thus we recommend developing on the box.  But you're definitely welcome to play with it.

I'm sorry you've had a hard time debugging.  There are actually a couple tricks you can use to speed up the process:

1) Upload a bunch of documents to your library.  If you do this, you don't have to cancel running workflows, since you can just use another document.  When you've used them all up, you can create a new association and run a new batch.

2) If you are only changing the workflow dll (and not forms or xml manifest files), don't do any stsadm commands.  Just reinstall the dll to the GAC and iisreset.  This cuts your deployment time by a lot, and you don't have to reactivate any workflow associations.

I'm not sure about your web service error; it looks like you're calling the web service correctly.  Perhaps it's because you're using a web service (AlterTask) inside a web service.  If you're creating a new web service on top of sharepoint, you can call the updatetask channel to update the task directly (ITaskService.UpdateTask) or direct item manipulation with OM code , i.e. item["TaskStatus"] = "Completed").  Generally, AlterTask is used from aspx pages or externally entities to sharepoint.

wrt the ExtendedProperties, I think the doc made a mistake; I believe you should be able to reference it like a normal field on the task, so instead of task.Properties["foo"], try task["foo"].  The task will appear in the task list when the workflow dehydrates, i.e. when the workflow goes to sleep to wait for an event or delay.  Workflow activities are transactional, meaning they don't commit until they dehydrate in case something happens and it needs to roll back, which is why you are not seeing the task until the workflow "completes" (I assume you don't have any kind of OnTaskChanged after your CreateTask?).

Anyway, I hope this helps.  If I missed something or you do have questions please let us know.  The ECM blog is also a good place to post, since I check it a little more frequently.

Good luck!

Eilene

Saturday, October 14, 2006 4:54 AM by Eilene Hao

# re: Introduction to SharePoint Workflow!

<p>Hi Eilene,</p>

<p>Thank you for your response.  Apologies if my original post was a little harsh -- the problems I was facing were causing me a little bit of pain.  But I've managed to work around them for now.</p>

<p>Thanks for your tips on speeding up debugging.  I'll take them onboard.</p>

<p>As for extended properties, I've tried various things to retrieve them, including your suggestion of retrieving it as a field.  Unfortunately, that does not work -- I get a System.ArgumentException: Value does not fall within the specified range.  My overall understanding of the SPListItem fields was that they are something that's built in, and the SPListItem.Properties hashtable was for everything else.</p>

<p>I don't know if it's an error is in the MSDN doc, or in the implementation -- but those extended properties seem not to end up anywhere accessible from the object model.</p>

<p>I've found a work-around -- it's described <a href="http://www.serious-sam.net/serendipity/index.php?/archives/21-Bug-in-SharePoint-ExtendedProperties-Propagation.html">here.</a></p>

<p>Thanks again for your reply.  Good luck with everything</p>

<p>Sam</a>

Thursday, October 19, 2006 9:07 PM by Serious Sam

# re: Introduction to SharePoint Workflow!

Hi Eilene,

   We are eveluating MOSS with Infopath and WinFx (Workflow) to replace our existing inhouse product(developed in ASP and COM). This is a generic framework which solves most of the workflow applications.

We are able to create a custom activities and workflows. We are facing few problems while hosting the workflow to asp.net application. Can you please provide few tips for hosting the workflows.

We are also planning to write few assembles which are coupled with the custom activities, so that we can make the activities generic for all the workflows with some kind of XML input.

Thanks in advance,

Sri

Monday, October 23, 2006 5:06 AM by Sridhar

# re: Introduction to SharePoint Workflow!

Hi Sri, do you need tips on building a host for Windows Workflow Foundation in general (i.e. not SharePoint specific)?  If so, the WF folks may be a good resource for you at http://wf.netfx3.com/ . :)  They have a lot of samples and forums that can help you get the info that you need.

Wednesday, October 25, 2006 1:50 PM by Eilene Hao

# re: Introduction to SharePoint Workflow!

Is it possible to route a "package" of multiple documents in a SharePoint workflow? Or is workflow intended to be document-centric (i.e., routing of a single Word document or a single Excel spreadsheet)?

Thursday, October 26, 2006 2:37 PM by Toby

# Understanding Workflow in Windows SharePoint Services V3 and the 2007 Microsoft Office system

We’ve received numerous inquiries via this blog and elsewhere for information on “how workflow actually

Friday, October 27, 2006 12:12 PM by Microsoft SharePoint Products and Technologies Team Blog

# re: Introduction to SharePoint Workflow!

I have limited knowledge about the program.  However, I have been given the task of finding out if the software can help us in the document distribution process.  I am trying to move file from one sharepoint site to another.  So far, I can move word or excel file no problem.  However, I am not able to move another type of file (such as PDF).  I am receiving the following error message "An error occurred copying some of all of the selected files" and “The target can not handle this type of document".  Does anyone know how to resolve this issue?  Thank you!

Monday, November 27, 2006 1:22 PM by Erin

# re: Introduction to SharePoint Workflow!

I have users from an NT4 domain using the sharepoint server. sharepoint doesnt pickup their email address so they dont get a workflow email. How can I get the email field poulate for those users?

Wednesday, December 06, 2006 2:58 PM by Eli

# re: Introduction to SharePoint Workflow!

I can't seem to find any of mentioned workflows in the RTM bits. Where can I find them?

Friday, December 08, 2006 9:10 AM by Mauro S

# re: Introduction to SharePoint Workflow!

Hello,

Wondering if you can shade light on one of my biggest workflow related problem (or at least point me in a right direction).

Is there a way to create a role based workflow in MOSS2007? By that I want to say that I need to create a workflow in which the steps are assigned not to user/groups but to roles, specifically the manager of the user. More exactly, I need to route a document to the manager of the user who created/modified the document. The manager role is created in AD and available in MOSS 2007 but I didn’t found a way to use it.

Any help would be greatly appreciated.

Monday, December 11, 2006 5:53 AM by Marian VULPE

# re: Introduction to SharePoint Workflow!

Hi, I installed Sharepoint, Designer & Office Professional (all 2007). In my out-of-the-box approval workflow after I approve a document I'm getting the following in the workflow's history "12/14/2006 4:22 PM Error  System Account  An error has occured in phil_approval. "

So I throttle up logging and in the find these last 3 lines in the log:

Line 1:

--------------------------------------

12/14/2006 16:22:48.54 w3wp.exe (0x0FC4)                       0x013C Windows SharePoint Services   Workflow Infrastructure       88xr Unexpected WinWF Internal Error, terminating workflow Id# ec53ba03-d712-4842-907a-b69163ac53f0

Line 2:

--------------------------------------

12/14/2006 16:22:48.55 w3wp.exe (0x0FC4)                       0x013C Windows SharePoint Services   Workflow Infrastructure       98d4 Unexpected System.ArgumentNullException: Value cannot be null.  Parameter name: name     at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)     at Microsoft.Office.Workflow.LocUtil.GetResourceString(SPWeb web, String resourceId)     at Microsoft.Office.Workflow.ReviewRouting.SetItemMetadata(Object sender, EventArgs e)     at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)     at Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.Execute(ActivityExecutionContext context)     at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)     at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext ...

Line 3:

-------------------------------------

12/14/2006 16:22:48.55* w3wp.exe (0x0FC4)                       0x013C Windows SharePoint Services   Workflow Infrastructure       98d4 Unexpected ...executionContext)     at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)     at System.Workflow.Runtime.Scheduler.Run()

----------------------

Any assistance is greatly appreciated. Thanks.

 Phil

Thursday, December 14, 2006 4:34 PM by Phil S

# re: Introduction to SharePoint Workflow!

I have discovered that the error I mention above only occurs if the "Update the approval status (use this workflow to control content approval)" checkbox in the last workflow configuration item ("Post-completion Worflow Activites" is checked.

I thought it might be a permissions issue but still get the error even if the site collection administrator does the approving.

Friday, December 15, 2006 10:29 AM by PhilS

# re: Introduction to SharePoint Workflow!

I'm having problem with moving items to another document library in sharepoint designer. I want to move document on a workflow to different document library after approval. Copy Item To on SD makes copy with different filename, if the file already exists on the target list.

How can I change that so it just makes another version of the existing document ?

Monday, December 18, 2006 1:46 PM by nurmimik

# re: Introduction to SharePoint Workflow!

How to trigger a SharePoint workflow when an item in the list is deleted?

Wednesday, December 20, 2006 8:15 AM by Samuel

# re: Introduction to SharePoint Workflow!

Create a event handler that starts the workflow.

Thursday, December 28, 2006 2:52 PM by blah

# re: Introduction to SharePoint Workflow!

how do we change the display icon of a document library item(e.g word doc)when a workflow is started on it..i have seen the pending approval image in the images folder but do not know how to incorporate it....i need to change the icon to signify that a workflow is running on it..something like the checkout icon which is displayed when an item is checked out

Tuesday, January 02, 2007 4:41 AM by keith rebelo

# re: Introduction to SharePoint Workflow!

Hi, I am using Sharepoint Designer to create a workflow that sends an email.  The email address needs to be obtained from a Sharepoint list value. Within the Sharepoint list, one of the fields(columns) is the person the email needs to be sent to.  I would like to just reference this person's name in the Sharepoint Designer email entry, but when I do that it just reads the person's account name, not the email.  I have also tried creating a new 'email' field in the Sharepoint list, defined as a person or group, displaying email, but again when Sharepoint Designer reads this new field, it only sees the account name.  Can I get the email address  into Sharepoint Designer without having to have a seperate email column in the list?

Thursday, January 04, 2007 4:12 PM by Rue McKay

# re: Introduction to SharePoint Workflow! On Delete event and uniqueness

There are a couple of posts asking if it is possible to initiate a workflow when an item is delivered. Sharepoint has a couple of major deficiencies compared to "normal" databases, i.e. the lack of ability to enforce uniqueness in a field and to cascade deletions, both of which are dead basic stuff for a database to have. The cascade deletions is required for, say, if you have an Orders list and an Order Items list. If you delete an order from the Orders list, how do you ensure associated items in the Order Items list also get deleted (or how do you stop the order from being deleted until its associated order items have been deleted first)? On the uniqueness front, how do I stop identical data being put into my lists?

Integration with Sharepoint has been touted as a major advance for Access 2007, but as has been pointed out by some rather dumbfounded Access developers, the two items I mentioned have been missed out. I was hoping that Workflow would provide a way of developing a work around, but I can see no way of doing it with Sharepoint Developer 2007.

It seems that the developers on Sharepoint / Access have got carried away with developing new, whizzy items, but forgotten some of the very basics.

Here's hoping to be proved wrong!

Alan Cossey

Friday, January 05, 2007 5:25 AM by Alan Cossey

# re: Introduction to SharePoint Workflow!

Hi,I want to shift on to sharepoint platform along with .Net as i m working on .Net Platform.All in all this is a good artical.Plz guide me abt this.

Monday, January 08, 2007 4:50 AM by Yogesh Nagpal

# re: Introduction to SharePoint Workflow!

I've used SPD to create a workflow which works well on one sharepoint form list.  How can I move the workflow to a different list?  Thanks.

Tuesday, January 09, 2007 10:22 AM by Scott

# -Unknown Error- on uploading a form to sharepoint

Hi,

Im having an error each time i try to upload  

a form to sharepoint FormServerTemplates. I have tried everything but still doesn't upload. ¿can somewan help me please?

thanks in advanced!!

Thursday, January 11, 2007 7:46 AM by Iker

# New year, new RSS link and a few other things

A belated “Happy New Year” to our readers! And a belated “Happy 1 st Anniversary” for our team blog!

Tuesday, January 16, 2007 8:45 PM by Microsoft SharePoint Products and Technologies Team Blog

# OOTB Approval Workflow Bits

I am working on a project that requires minor tweaks to the existing OOTB Approval workflow.  Where can I get the code and forms etc to make a copy and implement my customizations? I looked at the ECM Starter Kit but none of them really matched.

Thanks in advance!

Thursday, January 18, 2007 1:24 PM by Tony

# re: Introduction to SharePoint Workflow!

Hi,

  I am trying to migrate a SPD created workflow from one site to another and need some help. I know this isn't supported out of the box but any help would be greatly appreciated. I am able to re-create the association on the target site (after changing the BaseID, DocLibID etc) but the workflow gives an error when I try to start it on the target site. I have noticed in