in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Andrew Noon's Blog

SharePoint, MOSS 2007, Information Architecture, Business Intelligence and other rambling

SharePoint 2007 workflow with Visual Studio 2008

Before getting into this I thought developing workflow for SharePoint 2007 was a complex and daunting task to undertake. Whilst you still won’t find me saying it’s easy I will say that I’ve been pleasantly surprised at how intuitive the process has been. The following pages demonstrate the steps that are required to get a simple workflow going from setup to development and deployment.

Installation prerequisites

Visual Studio 2008 greatly simplified the processes of creating, deploying and even debugging workflows but if you need to it is possible to do all of this with Visual Studio 2005 and some additional work. The remainder of this document shows the steps required to create a simple workflow using the 2008 version of the product, so bear in mind that not everything will work as easily if you choose to use an older version such as 2005.

Visual Studio 2008

Software

Link for more information

Visual Studio 2008

MSDN Visual Studio Site

Windows SharePoint Services (WSS)

WSS 3.0 on Microsoft.com

Microsoft Office SharePoint Server (MOSS)

MOSS 2007 on Microsoft.com

WSS Software Development Kit (optional)

SDK Download

MOSS Software Development Kit (optional)

SDK Download

Table 1 - Visual Studio 2008 components

Visual Studio 2005

Software

Link for more information

Visual Studio 2005 Professional or Team Suite

MSDN Visual Studio Site

For Team Suite make sure you also download the latest Service Pack (SP1 at time of print)

Service Pack 1 Download

.Net 3.0 (FX) Runtime

.Net 3.0 Download

Windows SharePoint Services (WSS)

WSS 3.0 on Microsoft.com

Visual Studio extensions for workflow

Download workflow extensions

Visual Studio extensions for WSS

Download WSS extensions

Microsoft Office SharePoint Server (MOSS)

MOSS 2007 on Microsoft.com

WSS Software Development Kit (optional)

SDK Download

MOSS Software Development Kit (optional)

SDK Download

Table 2 - Visual Studio 2005 components

So what is a WSS workflow?

Firstly, it is assumed that you have a basic understanding of both workflow principles and development. Specifically though, when we talk about Windows SharePoint Services (WSS) and workflow we are talking about controlling events that can occur when an item in a list or library in a WSS site is changed. Typically this is either to model a business process through a level of automation (Business Process Engineering) and therefore minimising or to manage the lifecycle of content (Information Lifecycle Management).

Windows Workflow Foundation (WF) is the basic underlying technology that is used to define a workflow however WF alone does not make a workflow happen, it needs a host. WSS forms the host service that runs the workflow in conjunction with the WF run time. Together they will manage tasks, assignment of tasks, persist state over long running transactions (human intervention, scheduled tasks...), scheduling and tracking.

Sequential Vs State workflows, what is the difference?

Sequential workflow is nothing like it sounds. It does not mean that there is a single thread of activity with fixed route from start to end. A sequential workflow can have parallel tasks, can branch depending on state, properties, user response...In this case sequential simple means that the workflow has a single start point follows through a number of steps to reach a goal.

State (machine) workflows basically mean a workflow whereby the core component (a task, a document...) can have a number of states (draft, for review, reviewed, released, approved) and the movement between each of those states is controlled, for example it may be inappropriate to move state between draft and approved without passing the other state first. State workflow has a start and a number of activities that govern state but do not necessarily have to have an end state i.e. Approval can be the best state for content but after approval it’s entirely possible that the content may be reverted to draft for update.

Basic environment setup

You should now be able to load Visual Studio and within the workflow section of the new projects library you should have the option to create a number of different workflow types.

clip_image002

Figure 1- Setting the project name

At this point it depends on whether you are working on a MOSS2007 server or not as to what you do next. If you’re on a MOSS2007 server then simply create a new Sequential Workflow project. If not you’ll need to grab the SharePoint DLLs from the server, the easiest way of doing this is to take microsoft.sharepoint.* and microsoft.office * from the servers C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\ISAPI directory and create and copy to the same path on your development machine. You will now have all the references you need to create a workflow project, go ahead and simply create a new Sequential Workflow project.

You will be asked to specify both the name of the workflow to display to users and also the initial library you want to use during development (for debugging the workflow). Note that in Visual Studio 2005 you do not get this prompt and need to manually set this up.

clip_image004

Figure 2 - Naming the workflow

You will now be asked for the library to attach the development workflow to, the workflow history list (tracks progress) and the task list that you want to use (if assigning tasks).

clip_image006

Figure 3 - Set workflow associations

You will then need to decide when you want your workflow to fire, there are three events that can cause a workflow to start.

· Manually i.e. the user chooses to start a workflow on the current item

· On creation, the workflow is started as soon as an item is created (this can be either saving a document to a library or list, uploading a document or simply creating a new item)

· On change, the workflow will fire every time an item is changed, for document this means that the workflow will start if either the document itself is changed or any of the metadata associated with the document is changed.

I’m selecting all three because I want a user to be able to choose when to move an item and I want the item to be automatically moved if its metadata indicates that it is ready to move (that can happen on creation or as a result of the metadata changing).

clip_image008

Figure 4 - Select workflow triggers

I created a standard SharePoint Team site to use for developing the workflow and am using the default workflow history list, task list and document library, ‘Shared Documents’ as the workflow source.

clip_image010

Figure 5 - Team site

I have a simple workflow, so what now?

If you are using Visual Studio 2005 you will notice from the toolbox that although you have created a SharePoint workflow the extensions component does not automatically add the SharePoint items to the toolbox! To add them right click on the toolbox and choose “Add Items” sort the list by namespace and add the Microsoft.sharepoint.workflowactions namespace. If the namespace didn’t appear in the list then you’ll have to navigate to the DLL itself, click browse and usually you’ll find the DLL in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\ISAPI.

Now we’re ready to create a workflow, at last!

The first thing to do when creating a workflow is to simply draw it out on the page in its basic form. Don’t worry about the code yet, we’ll tackle that later. For my example I’m using the following workflow design:

clip_image012

Figure 6 - Simple workflow design

This is a very simplified process that when complete will check the metadata of a document and if it is ready to be moved will move it to the document centre in the top level SharePoint site. In anticipation of this I’ve added metadata to the default document library we specified when we created the workflow project. To do this load up the document library in your browser and from the settings menu choose ‘Create Column’, call the column ‘Approved for move’ and select the ‘Yes/No’ column type.

Once you’ve created your outline process / workflow map you can start defining in lower level detail how this is going to work. Before we dive into the code it’s important to understand two important aspects of the workflow. Firstly, the workflow need a unique identifier which it will ‘share’ with SharePoint basically it the mechanism the workflow runtime uses to identify the running instance of your workflow. This is called a correlation token and you need one for your workflow and one for each task you create during the workflow, so that when a user completes a task you have a unique identified with which to receive any input from the user into your workflow. If you click on the activation node of the workflow diagram you will see that you have been automatically assigned a correlation token. Secondly, it is important to know where you can find all the information about the source of the workflow (the SharePoint site, library and document or item that started the workflow off in the first place). Workflow Properties is an object that holds all the really important information about your workflow. When you create a workflow it is automatically set to the local variable workflowProperties. The following diagram shows the properties window showing both the correlation token and workflow properties settings.

clip_image014

Figure 7 - Workflow properties

Now that we have the principles out of the way we can move onto getting this fired up and running! Firstly we need to grab the ID that SharePoint has allocated to this instance of the workflow so that we can help SharePoint identify which instance of the workflow is running. SharePoint automatically allocated a workflow identifier in the workflow properties, it is this that we want to extract and store. To do this double click on the workflow activation node (the first node) and you will be taken into the code behind the node. Visual Studio automatically creates the method declaration and two variables for you to use. Your code should look like that shown below.

clip_image016

Figure 8 - Getting the workflow ID

Next we need some logic for our if statement, here you will see that I check the fields (metadata for the column we created earlier and return the value. To save confusion it needs to be said that the terms metadata, fields and columns are used pretty interchangably within the SharePoint world! To add the code for the if statement select the if/else node in the workflow designer and in the properties box set the condition type to ‘code condition’ and type the name of you condition. This will create a method stub for you to enter your code into.

clip_image018

Figure 9 - Setting branching logic

Now you will be placed into your workflow code again and you can add the required logic as such:

clip_image020

Figure 10 - Coding branch logic

So, there nothing too complex there we’re just getting the field back from the SharePoint item (document in this case) and reyrning the value to our workflow.

Now all we need is the code for the move and history log sections. Both are very simple, starting with the document move code, the following shows the code that’s required. Note there is no move function in the SharePoint object model so a copy then delete is required.

clip_image022

Figure 11 - Code document move

For the history log I will show two methods that can be used, the first and most simple is to add the required output to the properties of the node. Click on the ‘RecordNotReadyToMove’ node (the one without a code block above it) and set the ‘History Description’ property ‘Not ready to be moved’ and the ‘History Outcome’ property to ‘Not ready!’.

clip_image024

Figure 12 - Logging progress (simple)

Next, the more complicated (but flexible) method. Firstly declare two string variables for the history description and history outcome properties. IF you are not familiar with code then you do this after your class definition in such as.

clip_image026

Figure 13 - Logging progress (code), step 1

We now want to alter our document move code to update these variables to indicate the level of success. The following code is a good example of just how useful hat workflowProperties object is!

clip_image028

Figure 14 - Logging progress (code), step 2

Now we have the history variables set we can tell the history node in the workflow diagram to use these variables. To do that select the node and click first on history description, then the ellipses that appear to the right and then choose the _historyDescription variable we created earlier. Do exactly the same for the history outcome

clip_image030

Figure 15 - Logging progress (code), step 3

Ready to test

If your project will now build then you are bug free and ready to go. If not take a look at the errors that appear and try to fix them, it’s likely to be either a typo or a step you’ve missed as there’s not much that can go wrong at this stage.

In Visual Studio 2008 you can simply hit F5 or choose ‘Run’ from the debug menu and an the workflow will be deployed and an Internet Explorer window will be loaded with the document library you associated the development of the workflow with displayed. If you now upload a document to the library and make sure the ‘Approved for move’ checkbox is unchecked you will find that the library now has an extra column to tell you how the workflow is doing. If you check the items workflow history you will see that our code has been called and the expected output has been added.

clip_image032

Figure 16 - Reviewing workflow progress

Similarly, if you now edit the properties of the uploaded item and check the ‘Approved for move’ checkbox you will see the item disappear from the library you uploaded it to and it will appear in the Document Centre. Note though that when you do this the document that is copied to the Document Centre will not have any information relating to the workflow attached to it. To see the workflow history for the (now deleted) item you will need to go to the Workflow History list where you will find the expected output. There is no link to the Workflow History list but you can find it at http://[server]/[site]/Lists/Workflow%20History/AllItems.aspx and you should have an item such as:

clip_image034

Figure 17 - Hidden progress list

Deploy the workflow

So, that’s it – your workflow works and you’re ready to deploy. This is the easy bit! In essence the deployment of your workflow has already happened, if you’re using Visual Studio 2008 the workflow will have been automatically deployed to the site collection you specified as the development site when you first created the workflow project. However should you need to deploy the workflow to a different server or site collection then these are the steps that you’ll need.

The following steps will deploy your workflow to a site collection.

1. Copy the DLL your workflow creates from the build directory (\bin\Debug) to the Global Assembly Cache (GAC)

2. Create a directory in the features directory [C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES] and drop both the feature.xml and workflow.xml files into the directory.

3. Install the feature on your farm, using the following command line statements

stsadm -o installfeature -name DocumentMoveAndShortcut

Figure 18 - Install the feature

4. Activate the feature to a site collection

stsadm -o activatefeature –name DocumentMoveAndShortcut -url http://moss2007win2008

Figure 19 - Activate the feature

NOTE: You can usually find the STSADM command in the directory C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN

Published Feb 06 2008, 05:12 PM by Andrew Noon
Filed under:

Comments

 

LeeFAR said:

Nice walkthrough.  Have you done anything with taking a WF built in 2005 and opened it in 2008?  I have heard of problems.

February 6, 2008 12:32 PM
 

Andrew Noon said:

I haven't had to do it myself but it's easily tested!

I believe there are also a number of problem taking SharePoint Designer workflows into VS 2008 too.

February 6, 2008 4:26 PM
 

Links (2/7/2008) « Steve Pietrek’s SharePoint Stuff said:

Pingback from  Links (2/7/2008) « Steve Pietrek’s SharePoint Stuff

February 7, 2008 6:26 PM
 

Bookmarking the web - w06/2008 said:

Pingback from  Bookmarking the web - w06/2008

February 10, 2008 9:28 AM
 

Svájcibicska said:

Ha svájcibicska, akkor vágjunk is bele rögtön a közepébe. Az alapprobléma a következő: egy ügyfélnél

February 24, 2008 7:07 AM
 

Pat Tormey said:

Thanks Andrew!

I love clear step by step instructions.

Once the WF is deployed is there a way I can programatically assign it to a document library?

Pat Tormey

NH USA

March 3, 2008 4:13 PM
 

Andrew Noon said:

Hi Pat,

Something like this should do the trick:

...

SPWorkflowTemplateCollection templates = site.WorkflowManager.GetWorkflowTemplatesByCategory(web, null);    

                   SPWorkflowTemplate suivi = templates.GetTemplateByName("Approval", CultureInfo.CurrentCulture);

                   if (doc.WorkflowAssociations.GetAssociationByName(suivi.Name, CultureInfo.CurrentCulture) == null)

                   {

                       SPWorkflowAssociation association = SPWorkflowAssociation.CreateListAssociation(suivi, suivi.Name, taskList, historyList);

                       association.AutoStartCreate = true;

                       doc.EnableMinorVersions = true;

                       doc.EnableModeration = true;

                       doc.EnableVersioning = true;

                       doc.AddWorkflowAssociation(association);

                       doc.DefaultContentApprovalWorkflowId = association.Id;

                   }

                   doc.Update();

...

March 4, 2008 3:22 AM
 

Pat said:

>programatically assign it to a document library?

Elegant.. Thanks!

March 6, 2008 12:54 PM
 

Melissa said:

Hi Andrew, I am not working on the MOSS 2007 server, I am working on my dev machine. I copied the microsoft.sharepoint.* and the microsoft.office* from the server to my local machine. But when I try and create a new sharepoint2007sequentilaworkflow project. I get the following error:

Could not load file or assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependancies. The system cannot find the file specified.

Have you seen this error before?

March 13, 2008 12:50 PM
 

table setting diagram said:

Pingback from  table setting diagram

March 23, 2008 4:56 PM
 

Harv Stewart said:

Harv.Stewart@cardinal.com

I'm trying to develop workflows for v3.0 sharepoint using visual studio 2008 on my XP workstation.  When I try to start a new workflow project, I get an error about a missing DLL.  

It appears that although visual studio can run on an XP workstation, developing workflows requires a machine running WIndows Server 2003, so that WSS and other Sharepoint infrastructure (and their DLLs) are present.

Is this a correct picture, and if not, how do I configure XP to allow workflow dev?  Thanks very much for your time and help.

Harv Stewart

Cardinal Health

Commodity Computing

Process Engineer

Harv.Stewart@cardinal.com

March 27, 2008 2:09 PM
 

Andrew Noon said:

You should just have to move the DLLd over from the server to your client and reference them in the project.

March 28, 2008 5:38 AM
 

Robert Nelson said:

Very nice, thanks!  Have you had occasion to create and deploy a State Machine workflow in VS2008?  I've not found much information on this.  Any resources you know of?

March 28, 2008 9:01 AM
 

Andrew Noon said:

I've put together a few demos but never delivered an enterprise workflow using a state machine.  Sorry, but I don't have any killer links either, I'd be googling which I guess you're doing right now!

March 28, 2008 9:40 AM
 

Paisleygo said:

I love this walkthrough - thanks!!

Hey - can you tell me where I can look in the code to see what library the workflow is assigned to (the part that you set up in the wizard when you create the project). And those libraries - the workflow history and the task list - do you have to create those? before you run that wizard?

March 28, 2008 11:06 AM
 

Paisleygo said:

also - I have noticed that a document library has both the workflow settings AND the versioning settings that affect the workflow.

How do you set up the items on the versioning settings page? Do you have require approval off - and  versioning off and require checkout off? -It seems to work if you have all that off - but if you change any of those it makes life exponentially more difficult.

Your Thoughts?

thanks again for this incredibly helpful walkthrough

March 28, 2008 4:58 PM
 

sharepoint 2007 routing workflow said:

Pingback from  sharepoint 2007 routing workflow

April 10, 2008 9:37 AM
 

how to delete browser cache said:

Pingback from  how to delete browser cache

April 14, 2008 7:12 PM
 

decatec said:

Excellent WorkFlow + VIsual Studio 2008 post

April 19, 2008 6:41 AM
 

Robby said:

I am new to SharePoint 7 and haven’t done any work on SharePoint before! I want to create a workflow to maintain and manage a document.

For example – a document is uploaded  a list of people are notified that a document is on team room via email  they can access and assign the document to themselves  once they have finished work on the document and its back on team room  anther email is fired to another list of people, including who uploaded the document, notifying that its available. The whole process is automated and recorded at all times with names and dates.

I understand that I need to have visual studio to start off. Would the steps you have described in your blog will result in the above? It sound quite easy but for someone like me who has never worked with SharePoint it seems quite difficult. Thanks.

April 21, 2008 7:03 AM
 

Andrew Noon said:

It wouldn't result in the exact requirement you have but it would help you get there.  The additonal changes you need are not too complex.

However, if you are very new to MOSS then there are some learning 'opportunities' for you along the way.

I'd suggest you look at using a busines sprocess for some of what you request, for example you can get automatic email notification of new documents entering the library and it may be stretching the point but you can choose to be updated with 'all changes' to content within the library (such as the document being approved / changed.  In this case you could request that any interested parties use the 'Alert Me' functionality to acheive this.

If you need this automating then, yes we are back to the 'learning opportunity' but consider the business process / governance before you throw money away on the development approach.

April 21, 2008 11:43 AM
 

ruselle said:

Hi i'm using visual studio 2008 to create my workflow on my client machine (i.e. i'm not developing on my sharepoint server). I am having problems connecting to my site as depicted in Fig 2. I'm getting this error:

SharePoint site location entered is not valid. The SharePoint site at http://sitename could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

Do you have any idea why this is happening? The site comes up fine in IE 7.

April 28, 2008 11:49 AM
 

??ghyBlog » Workflow, custom task form, GUID váltás said:

Pingback from  ??ghyBlog » Workflow, custom task form, GUID váltás

May 1, 2008 1:19 PM
 

Richard Jacobs said:

Hi

Great blog! Easy to read and follow!

I have an issue though :(

I have been trying to create some test workflows (to show the project managers here what can be done with SP) and am creating the first one.

In short, the idea is an item is created in a document library and the workflow for that item is not complete until a checkbox on the initiation form is checked. Really simple. (trying to illustrate a while loop)

However when I create a new item in the doc library I get the error:

{"Value cannot be null.\r\nParameter name: s"}

Basically, the workflowProperties.InitiationData string is null.

This is because my initiation form is not opened when I create a new item. I have modifiied the workflow.xml to use the URN for my initiation form.

Any ideas why my form is not opening when I create a new item?

many thanks

May 7, 2008 10:33 AM
 

Richard Jacobs said:

Hi,

Great blog, really easy to follow and makes it so simple!

I have been trying to go a step further and develop a workflow with my own Association and Initiation forms developed in InfoPath 2007 and published to a network location (my VS2008 project).

When I run the workflow and create a new document in the document library I get an error on my “onWorkflowActivated” method. “workflowProperties.InitiationData” is null. I believe this is because my initiation form is not opened. Is there any reason why my initiation form is not opened? I have changed the URNs in the workflow.xml file

May 8, 2008 4:20 AM
 

Barrett said:

Can you deploy a workflow created in VS2008 for MOSS 2007 to a sharepoint services 3.0 site

- we just use it for an internal solution (the free sharepoint) and being a school district, we don't have the money for MOSS 2k7....  Is this possible?

May 8, 2008 6:52 AM
 

alegna said:

Is it possible to handle an external event from a SharePoint workflow? Is so, how can you acces the SharePoint Workflow runtime to add the appropriate service?

May 8, 2008 7:46 AM
 

ms said:

Very valuable info posted here ..!

I have built complex custom approval workflow, I have used ACL for striping the permissions. The problem is

I cannot update specialpermissions property of createtask activity when i reassign the task  ie in updatetask activity.

please help.

May 13, 2008 9:19 AM
 

Mehul said:

Hi i'm using visual studio 2008 to create my workflow on my client machine (i.e. i'm not developing on my sharepoint server). I am having problems connecting to my site as depicted in Fig 2. I'm getting this error:

SharePoint site location entered is not valid. The SharePoint site at http://sitename could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

Do you have any idea why this is happening? The site comes up fine in IE 7.

May 15, 2008 4:45 AM
 

Roger said:

Hi Andrew,

great write-up! I have a question that may be a little off-topic...

we're using Visual Studio 2008 and have been trying to figure out how to create web services for MOSS 2007. With Visual Studio 2005, there're extensions to install. However, we've not been able to find anything similar in 2008. My assumption was that it was built-in. Yet, we've not found it.

May 27, 2008 8:01 AM
 

Alan said:

Andrew,

Thanks for an excellent post. This is the first time I've built  workflow and it worked perfectly. I'm now off to start customising it some more.

May 29, 2008 10:08 AM
 

Mary Lou said:

I am trying to create a workflow with Visual Studio 2008 on my development machine.  I have copied all the .dll files like explained in this article.  I am getting this message:

Could not load file or assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependancies. The system cannot find the file specified.

I can get past this error but get stopped at the error that tells me to install MOSS 2007.  

Do you have any help on this issue?

Thanks

June 6, 2008 10:28 AM
 

Joe said:

I'm having the same problem as Mary Lou.  Simply copying the DLL's to my development machine does not do the trick.  Anyone here know what else to do?

June 11, 2008 12:54 PM
 

E King Gill said:

Hi,

Im working on infopath 2007 and sharepoint workflows. I have some managed code in the infopath form template. This form submits information to a database via a web service. I was wondering whether there is any way to "Submit" the information only when the form is "Approved" (i.e. Access the form.submit() method from the workflow code)

June 17, 2008 6:58 AM
 

Sharepoint User said:

Make sure that you develop on your Sharepoint Testing Server or you will be in for a Hell of a time setting up references and DLL files. There is SO many undocumented minor steps to take having Visual Studio installed on the testing server knocks out 99% of them. You cannot find a good Workstation reference for developing remotely so save yourself some time.

June 17, 2008 9:36 AM
 

E King Gill said:

Thanks. But I just want to know whether an infopath form's data can be submitted to a database via a workflow action

June 18, 2008 2:03 AM
 

NewToSP said:

I have been able to build my project successfully but when I go to the Event viewer, it shows an error that says 'SQL database .... on SQL server instance ..... not found'.

Is this something which is not configured on the server level for all workflows and what can I do to get rid of this error?

Thanks

July 1, 2008 5:27 AM
 

Zam said:

I'm developing my workflow on the same workstation as my sharepoint resides on and I'm using WSS 3.0. When creating a workflow as dipicted in figure 1, in the wizard when it prompts for a location for the workflow to be stored I get:

SharePoint site location entered is not valid. The SharePoint site at http://sitename could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

Is this happening because I'm using WSS? and if so is there a way around this without having to install MOSS 2007?

Thanks.

July 3, 2008 11:03 AM
 

Quyen Nguyen said:

Hi,

I have problem when creating new project SharePoint 2007 Sequential Workflow. I do it on the client machine (Windows XP with VS 2008) without MOSS 2007. I got an error messagebox: A 32-bit version of SharePoint Server is not installed. Please install a 32-bit version of SharePoint Server.

Do you have any help with it?

Thanks

July 3, 2008 10:32 PM
 

Vinh Tran said:

Hi Andrew!

A very helpful post.

Have you ever tried to develop SharePoint workflow by VS 2008 from an XP workstation?

Kind of doubt that we cannot do it.

Thanks for the post anyway,

July 9, 2008 4:42 AM
 

Vivek said:

very much clear steps..thanx.. Actually i want to get an event when Sharepoint Adds New user to list called User Information List (hidden list in SP so i cant assign directly) ..So is there any way to assign our WorkFlow to this Hidden list??

Thanx n Regards,

Vivek Panchal

July 10, 2008 2:02 AM
 

Vairamuthu said:

Hi

What I need is when I update the List I need to call the work flow activity. In work flow we are having OnTaskChanged event it will trigger when we  change the Task, like wise If I change the list some action needs to happen in workflow .How can I do that one?

July 11, 2008 7:43 AM
 

vairamuthu said:

I am developing workflow using VS2005

In Tasklist i have added two custom column (Action,Comments).when i create a new task from workflow using create task activity.Here code is there

TaslId=GUID.NewGUID();

TaskProps.AssignTo="DOMIN/User";

TaskProps.Title="Review this task";

//Custom Columns

TaskProps.ExtenedProperties["Action"]="Reject";

TaskProps.ExtenedProperties["Comments"]="Reason for rejection";

It show all the columns in AllItem.aspx.when i edit the task ,Custom columns are not display in Dispayitem.aspx,Edititem.aspx.what is the problem ? i need to set any thing in list setting? If i add a new task item manually.All custom columns are displaying in displayitem.aspx,Editeitem.aspx.

July 17, 2008 2:09 AM
 

ZEd said:

Very cool step by step article, helped me understand workflow better, thanks

July 19, 2008 6:43 AM
 

Chan said:

Maybe I am asking a question in a wrong place. But I think this is the most proper place for my question.

Currently I am working with Workflow using Infopath 2007 forms as an association and initiation form. Each association and initiation forms includes VSTA managed code. (the managed code collects user information from Active Directory)

The problem is when I remove the managed code the form is working fine but if I add any small bit of VSTA code with those forms, it shows an error, "The form has been closed" during association/initiation process.

As I know, managed codes must be compatible with browserble infopath forms.

Any idea?

Thank you.

August 27, 2008 11:53 AM
 

Priyanka said:

Hello,

I had few questions regarding starting the workflow. We know that workflow can be started automatically on creation/modification of an item in the list with which Workflow is associated. But what if I want to start the workflow based on some event, like end of quarter, or end of year. How can I code that?

Another thing is I don't want the workflow to start on all the items in a list, but only specific item in the list. For example on a document in the list, which has a field DocumentType="Report". How can I manage it, any ideas?

Any help would be more than welcome

Thanks

September 5, 2008 2:00 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

About Andrew Noon

Technical Consultant Strengths  Microsoft Office SharePoint Server 2007  SharePoint Portal Server 2003  Windows SharePoint Services  Enterprise Content Management  Business Process and Workflow Skills  Microsoft .NET C#  SQL Server  ASP.NET  K2  Information Architecture Certifications  Microsoft Certified Professional (MCP)  FileNet Certified Professional  Sun Java Certified Professional

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts