Enabling Declarative Workflows for Anonymous Users in SP2010/2007

Christophe asked a question about how to allow anonymous users to start workflows in SharePoint 2010. The question spread on both Twitter and SharePointOverflow before I had a chance to answer directly, so I’m posting the response here rather than trying to chase all the locations Smile

By default, anonymous access to run declarative workflows are disabled. This only affects anonymous users because a workflow started by an anonymous user would need to be assigned special credentials that would exceed the normal permissions of the anonymous user. For authenticated users, the workflows run with the credentials of that user, but there are no such credentials for anonymous users.

This situation occurs when you’re trying to email enable lists that have automatically launched workflows attached. In these scenarios, anonymous users can send emails to a list and have a workflow start, regardless of their permissions on the list.

It’s actually a very useful feature, and I’ve described such a scenario as part of a solution in an article I wrote several years ago on SharePoint Designer Workflows. Back then, anonymous access was enabled by default. In WSS3 SP1, Microsoft changed the behavior to not allow anonymous access at all, but allowed it if you set a special property in WSS SP2.

You can enable anonymous workflow access by setting the declarativeworkflowautostartonemailenabled property on the farm, either using SharePoint Manager 2010 or through PowerShell or STSADM:

stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true

Found this article valuable? Want to show your appreciation? Here are some options:

a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.

b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.

c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!

Pin It

SharePoint Workflow – What You Need to Know

The most powerful feature of SharePoint, at least the one most likely to cause a high return on investment (ROI), is the tight integration and high utilization of workflow.

In this short article, I will tell you what you need to know about SharePoint workflow in order to understand how to harness the power and potential economic benefit of business process management in SharePoint.

So, What Is a Workflow Anyway?

OK, you may have heard me use that exact phrase before, and you’d be right, as I explained this in a previous post on SharePoint Designer workflow. Rather than repeat what I wrote then, however, I’d like to offer a more descriptive… description.

A workflow is a formalized business process mapped to various executable activities on a computer. Think of a workflow as a highly adaptable and configurable program that performs a series of tasks. The program is adaptable in that it can be changed depending on business needs.

The ‘various’ part of the explanation is where you get the power of workflow. Compared to a traditional program, in which you often get a set of features and need to rewrite the program to extend that set of features, workflows allow you to pick and choose from activities.

Figure 55 

In short, you get a ‘pick and choose’ program that you can change as your needs change. Workflow is the Lego of programming, in a manner of speaking.

Wait, Programs? That Sounds Complicated and Unstable?

Yes, which is why I say ‘in a manner of speaking’.

You see, at least in the Windows Workflow Foundation that SharePoint uses, the framework handles most of the nitty-gritty details for you, and enables you, more or less, to just say what you want to happen when during a process. The stability and flexibility is also handled by the framework so you don’t need to worry as much about your workflows as you would normal programs. 

For example, if your server goes down, the framework will make sure that your workflow continues to run after the server comes back up. If you need to change your workflow, the framework and SharePoint will ensure that running workflows complete and that new instances of the workflow only use the new version of the workflow.

What Are Some Common SharePoint Workflow Examples?

Probably the most common example used is an approval workflow, in which some form of data requires approval from someone. The default SharePoint approval workflow is one such example, in which the author of the data requests approval for an item or document. This may be a request for expenses reimbursed, a vacation request, or any other request for which on user requires the approval of another user to complete some task.

Another common example is document management. Regardless of size, almost all organization have some form of document management, even if it’s as simple as telling a secretary to file a report in a certain file cabinet. Workflow can help automate document management, and the SharePoint document workflows offer some out-of-the-box functionality to cater to basic needs.

However, these are just two examples of scenarios in which workflow may help. The nature of workflow is that it can be customized to almost any business process, if nothing else than to track the progress of those processes or audit what happens during a process.

How Can I Create SharePoint Custom Workflows?

You have several options for creating and customizing workflow.

Out-of-the-box SharePoint Workflows

Granted, out-of-the-box doesn’t sound very customizable, but the truth is, many of these workflows are flexible enough to solve at least basic needs. For example, for the SharePoint approval workflow, you can customize who gets to approve an item or document, as well as deadlines for the approval tasks, and allow or disallow the approvers to reassign the workflow approval task.

If this still doesn’t meet your needs, you may want to take one step up.

SharePoint Designer Workflows

SharePoint Designer (SPD) offers a basic workflow authoring experience. With SharePoint Designer 2007, end users can create workflows without needing to learn complicated tools or adopt programming as a career.

Despite the perceived simplicity of SharePoint Designer workflows, however, you can accomplish fairly complex tasks using the built-in activities in SharePoint Designer. In addition, you can get or create additional activities to further customize your workflow and in essence create your own Lego pieces.

Figure 84 

SharePoint Designer is often scoffed at by developers as being a FrontPage bastard child. However, for designing one-off workflows with a very gentle learning curve, SharePoint Designer workflow is the way to go.

In addition, several of the limitations of SharePoint Designer 2007 are improved in SharePoint Designer 2010, as I have written previously in the first and second look at SharePoint Designer 2010 as well as the SharePoint Designer 2010 workflow features article.

You can learn all about SharePoint Designer workflows in issue 4 of Understanding SharePoint Journal.

Visual Studio SharePoint Workflows

The limitations of SharePoint Designer workflows become apparent when your needs become a bit more complex. That is when you may want to turn to Visual Studio.

Visual Studio offers the maximum amount of flexibility and power at the cost of a longer and more complex learning curve. If you want complete control and maximum power, however, that is the price to pay.

 Figure 84

However, while Visual Studio is traditionally considered a programmers tool, it is a myth that creating Visual Studio workflows require programming skills. You can get a lot more done if you do use some programming, but in essence, the same building-block paradigm is used in Visual Studio workflows as well.

You can get an introduction to Visual Studio workflows for SharePoint in issue 7 of Understanding SharePoint Journal.

Third-party Workflow Tools

If neither of these options are to your liking, you may want t
o turn to third-party workflow tools. Some well known tools are K2 BlackPoint and Nintex Workflow 2007.

Third-party tools offer both competing and complementary features to the already mentioned workflow tools. For example, Nintex Workflow 2007 offers a combination of the ease of SharePoint Designer workflows with some of the power of Visual Studio.

While a complete description of all the available tools is a bit beyond the scope of this article, you should know that these third-party alternatives exist.
You can also get the free Using Nintex Workflow 2007 issue of, you guess it, Understanding SharePoint Journal, if you want to explore that product more.

Anything Else?

Yeah, don’t forget to brush your teeth and floss. Seriously, everything I have said here is just my personal opinion, but brushing your teeth and using dental floss is recommended based on hard, scientific proof. Proper dental care leads to healthier teeth, prevents bad breath, and can improve the whiteness of your teeth without damaging chemicals.


Pin It

SharePoint Designer 2010 Workflows – First Look

If you want to learn about SharePoint Designer 2010, you should check out http://www.sharepointdesigner2010workflow.com/.

It’s time to start preparing for the third issue of the SharePoint 2010 Beta series of Understanding SharePoint Journal. This time, I’m going to post some rather unique info, namely a walkthrough of creating your first SharePoint Designer 2010 workflow.

Long story short, here’s a first look at SharePoint Designer 2010 workflow authoring. Keep in mind, as always, that anything SharePoint 2010 related is highly speculative at this point, and the entire software package may turn out to be a new version of Notepad.

Ribbon Interface

First, begin getting used to working with the ribbon in SharePoint Designer as well. No more menus, at least not the drop-down thing we know from the 2007 version.

Figure 1

Note some missing icons and the two different types of workflow buttons available. As I mentioned in my previous post on SharePoint Designer 2010 Workflow features, you can now create both list or library bound workflows and reusable workflows that work on generic data. Once you have chosen either, as for other Office apps, the ribbon changes to show you the context menu for your current task, in this case, what you can do with workflows.

Figure 4

Do you see the Association Columns button? This is one of those things that can make SharePoint Designer workflow authoring a lot more powerful. Basically, Association Columns are columns, or fields if you like, that SharePoint will add to the list or library when you associate a workflow with a list. So, for example, if you need a new column to store workflow related data such as a custom status column, you can use this feature to accomplish that.

Workflow Designer Window

I’m sure you’re all aching to see this as well, to see what the new workflow authoring experience is really like. Well, here it is.

Figure 6

Neat? Gone is the popup workflow designer wizard and the horrible add-on feeling. Now, authoring workflows is an integrated part of the rest of the application rather than an external window.

Well, I know you don’t really see all the goodness from just this window, but let me show you a few cool things.

First, notice the orange line under the first step. That’s actually a cursor that you can control with your keyboard. You can now control a lot more of the workflow authoring without using the mouse.

Notice also that in the first step it says Start typing or use the Insert group in the Ribbon. The location of the workflow cursor decides what you get when you start typing. If the cursor is between steps, you can type Step (or S) and hit Enter to get a list of available insert options for steps:

Figure 7

When the cursor is inside any step, you get a list of all the available actions when you type something and hit enter, or if you have typed a specific enough phrase, the action itself:

 Figure 8

Figure 9

This feature is somewhat similar to what Visual Studio users know as IntelliSense, but it’s not quite the same. For example, you still need to hit Enter to get a list of results, whereas Visual Studio will give you the drop-down of available options while you type.

Figure 10

Configuring Actions

I absolutely love the new way of configuring actions; much easier than those dreadful wizards. Now, everything is in a neat little box, like the properties window from Visual Studio:

Figure 11

The Edit property button will still launch the familiar dialog boxes to configure each property, however, and if you do prefer the SharePoint Designer 2007 way of configuring the actions, you can still click the underlines links in the actions, just like before.

One particularly nice thing is that the email action now allows you to build dynamic subjects so you don’t need a separate Build Dynamic String action to create a subject:

Figure 12

Speaking of actions and strings, there are now some nice, new utility actions that will make it easier to create more complex strings, substrings, or other variables as well:

Figure 13

SharePoint Designer Workflow Settings

The final thing I want to show you before leaving you hanging and wanting to buy the series subscription is the workflow settings page.

Figure 14

Note that the content type association is not editable. Once you hook a workflow, reusable or not, to a content type or list, the workflow is stuck with that content type or list. This does make perfect sense, since you are using content type or list specific columns.

Also note the twist in start options. Rather than saying when or how you want to launch the workflow, you now have to say when or how you do not want to start the workflow.

The last tidbit is the easy access to the forms used in the workflow. However, I’m going to leave the screenshots of that out, as there apparently still are some issues with this beta.

My Thoughts So Far

I’m going to sum this up as such: Wow.

You’ll get the full story and a lot more detail in the next SharePoint 2010 Beta issue, so grab a series subscription today. ‘Nuff commercial stuff, either you want to be in the loop or you don’t.

It is very apparent that Microsoft has listened to its users and made improvements that will be massively useful for workflow authors. The whole feel of the authoring experience is much smoother and more efficient. The use of keyboard navigation inside the workflow designer is excellent.

I’m not going to cover any negative impressions I have gotten so far. Many of the issues I have found are likely related to the beta status of SharePoint 2010 and SharePoint Designer 2010. As such,

Oh yeah, and I’m still working under the assumption that Microsoft meant what it said about openly discussing the clients of the Office 2010 beta program, of which I am a participant. Oh, and yes, I do have legal and non-NDA SharePoint 2010 access.


If you want to learn about SharePoint Designer 2010, you should check out http://www.sharepointdesigner2010workflow.com/.
Pin It